-
Notifications
You must be signed in to change notification settings - Fork 16
fix: for backport 7.0. #269
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,50 @@ | ||||||||||||||
| FROM ubuntu:bionic-20200219 AS tmp | ||||||||||||||
| WORKDIR /build | ||||||||||||||
| RUN apt-get update && apt-get install -y curl wget zip | ||||||||||||||
|
|
||||||||||||||
| RUN ARCH=$(dpkg --print-architecture) && \ | ||||||||||||||
| if [ "$ARCH" = "amd64" ]; then \ | ||||||||||||||
| wget -O jre.zip https://github.com/supertokens/jre/raw/refs/heads/master/jre-15.0.1-linux.zip; \ | ||||||||||||||
| elif [ "$ARCH" = "arm64" ]; then \ | ||||||||||||||
| wget -O jre.zip https://github.com/supertokens/jre/raw/refs/heads/master/jre-15.0.1-linux-arm.zip; \ | ||||||||||||||
| else \ | ||||||||||||||
| echo "Unsupported architecture: $ARCH" && exit 1; \ | ||||||||||||||
| fi | ||||||||||||||
| RUN unzip jre.zip | ||||||||||||||
| RUN mv jre-15.0.1 jre || mv jre-15.0.1-linux-aarch/jre-15.0.1 jre | ||||||||||||||
| ADD ./cli ./cli | ||||||||||||||
| ADD ./core ./core | ||||||||||||||
| ADD ./plugin-interface ./plugin-interface | ||||||||||||||
| ADD ./plugin ./plugin | ||||||||||||||
| ADD ./ee ./ee | ||||||||||||||
| ADD ./config.yaml ./config.yaml | ||||||||||||||
| ADD ./version.yaml ./version.yaml | ||||||||||||||
|
|
||||||||||||||
| RUN ls && ./jre/bin/java -classpath "./cli/*" io.supertokens.cli.Main true $@ | ||||||||||||||
|
|
||||||||||||||
| FROM debian:bookworm-slim | ||||||||||||||
| RUN groupadd supertokens && useradd -m -s /bin/bash -g supertokens supertokens | ||||||||||||||
| RUN apt-get update && apt-get install -y --no-install-recommends gnupg dirmngr curl && rm -rf /var/lib/apt/lists/* | ||||||||||||||
| RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata | ||||||||||||||
| ENV GOSU_VERSION=1.7 | ||||||||||||||
| RUN set -x \ | ||||||||||||||
| && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ | ||||||||||||||
| && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ | ||||||||||||||
| && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ | ||||||||||||||
| && export GNUPGHOME="$(mktemp -d)" \ | ||||||||||||||
| && gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ | ||||||||||||||
| && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ | ||||||||||||||
| && gpgconf --kill all \ | ||||||||||||||
| && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ | ||||||||||||||
| && chmod +x /usr/local/bin/gosu \ | ||||||||||||||
| && apt-get purge -y --auto-remove wget | ||||||||||||||
| COPY --from=tmp --chown=supertokens /usr/lib/supertokens /usr/lib/supertokens | ||||||||||||||
| COPY --from=tmp --chown=supertokens /usr/bin/supertokens /usr/bin/supertokens | ||||||||||||||
|
Comment on lines
+41
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Either:
Suggested change
Spotted by Diamond |
||||||||||||||
| COPY ./supertokens-postgresql-plugin/.github/helpers/docker/docker-entrypoint.sh /usr/local/bin/ | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The path to Consider changing the path to: This will ensure the Docker build can locate the entrypoint script correctly.
Suggested change
Spotted by Diamond |
||||||||||||||
| RUN echo "$(md5sum /usr/lib/supertokens/config.yaml | awk '{ print $1 }')" >> /CONFIG_HASH | ||||||||||||||
| RUN ln -s /usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat | ||||||||||||||
| RUN chmod +x /usr/local/bin/docker-entrypoint.sh | ||||||||||||||
| EXPOSE 3567 | ||||||||||||||
| USER "supertokens" | ||||||||||||||
| ENTRYPOINT ["/entrypoint.sh"] | ||||||||||||||
| CMD ["supertokens", "start"] | ||||||||||||||
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.
The ARM JRE extraction path appears inconsistent with the downloaded file name. The script downloads
jre-15.0.1-linux-arm.zipbut attempts to extract fromjre-15.0.1-linux-aarch/jre-15.0.1. Consider updating the extraction path to match the expected directory structure of the downloaded ARM zip file, likelyjre-15.0.1-linux-arm/jre-15.0.1or simplyjre-15.0.1-linux-arm.Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.