-
Notifications
You must be signed in to change notification settings - Fork 22
Provide a single self-contained docker image, remove alpine #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
493c22b
Provide a single self-contained docker image, remove alpine
antonsviridov-src ba95942
Release docker image on main branch builds as well
antonsviridov-src 29463d7
Add a note about upgrading docker version
antonsviridov-src 6feaa2e
Only publish to NPM on tags
antonsviridov-src File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,42 @@ | ||
# Keep in sync with Dockerfile.autoindex | ||
FROM node:20.8.1-alpine3.18@sha256:1ccb0c0ded3b21cee95fe6b6ce1ac23bd6680c8f152cbfb3047d5d9ea490b098 | ||
# When updating the version of the base container, please use the | ||
# SHA256 listed under 'Index digest' on Docker Hub, | ||
# not the 'Manifest digest'. | ||
# | ||
# This ensures that when pulling the container, Docker will detect | ||
# the platform and pull the correct image (if it exists) | ||
# | ||
# Alternate way of determining the Index digest using the docker CLI. | ||
# | ||
# $ docker buildx imagetools inspect node:22.12.0-slim | ||
# Name: docker.io/library/node:22.12.0-slim | ||
# MediaType: application/vnd.oci.image.index.v1+json | ||
# Digest: sha256:a4b757cd491c7f0b57f57951f35f4e85b7e1ad54dbffca4cf9af0725e1650cd8 | ||
# And use this digest in FROM | ||
ARG base_sha=a4b757cd491c7f0b57f57951f35f4e85b7e1ad54dbffca4cf9af0725e1650cd8 | ||
|
||
ARG TAG | ||
FROM node:22.12.0-slim@sha256:${base_sha} | ||
|
||
RUN apk add --no-cache git curl | ||
ENV NODE_OPTIONS=--max-old-space-size=4096 | ||
|
||
RUN yarn global add npm yarn | ||
RUN apt update && \ | ||
apt install -y git bash curl ca-certificates python3 make build-essential automake autoconf curl && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
npm install -g n yarn pnpm --force | ||
|
||
RUN yarn global add @sourcegraph/scip-typescript@${TAG} @sourcegraph/src | ||
WORKDIR /app | ||
|
||
CMD ["/bin/sh"] | ||
COPY . . | ||
RUN npm install && npm run build && npm install -g . | ||
|
||
WORKDIR /src | ||
|
||
RUN mv /usr/local/bin/yarn /usr/local/bin/actual-yarn | ||
COPY ./dev/lenient-yarn.sh /usr/local/bin/yarn | ||
|
||
RUN mv /usr/local/bin/npm /usr/local/bin/actual-npm | ||
COPY ./dev/lenient-npm.sh /usr/local/bin/npm | ||
|
||
RUN mv /usr/local/bin/n /usr/local/bin/actual-n | ||
COPY ./dev/lenient-n.sh /usr/local/bin/n | ||
|
||
ENTRYPOINT ["scip-typescript"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need a corresponding change in sg/sg to change the image we use for autoindexing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I will update the SHA in sg/sg to the sha of the new container (single one).
We only refer to indexing containers by sha, not name (in default settings anyways)