Skip to content

Commit dcba2e4

Browse files
SattvikSattvik
authored andcommitted
fix: docker scripts
1 parent 0111d00 commit dcba2e4

File tree

2 files changed

+446
-0
lines changed

2 files changed

+446
-0
lines changed

.github/helpers/docker/Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM ubuntu:bionic-20200219 AS tmp
2+
WORKDIR /build
3+
RUN apt-get update && apt-get install -y curl wget zip
4+
RUN wget https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_linux-x64_bin.tar.gz
5+
RUN tar -xzvf openjdk-15.0.1_linux-x64_bin.tar.gz
6+
RUN ls && mv jdk-15.0.1 jre
7+
ADD ./cli ./cli
8+
ADD ./core ./core
9+
ADD ./plugin-interface ./plugin-interface
10+
ADD ./plugin ./plugin
11+
ADD ./config.yaml ./config.yaml
12+
ADD ./version.yaml ./version.yaml
13+
14+
RUN ls && ./jre/bin/java -classpath "./cli/*" io.supertokens.cli.Main true $@
15+
16+
FROM debian:bookworm-slim
17+
RUN groupadd supertokens && useradd -m -s /bin/bash -g supertokens supertokens
18+
RUN apt-get update && apt-get install -y --no-install-recommends gnupg dirmngr curl && rm -rf /var/lib/apt/lists/*
19+
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
20+
ENV GOSU_VERSION=1.7
21+
RUN set -x \
22+
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \
23+
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
24+
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
25+
&& export GNUPGHOME="$(mktemp -d)" \
26+
&& gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
27+
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
28+
&& gpgconf --kill all \
29+
&& rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \
30+
&& chmod +x /usr/local/bin/gosu \
31+
&& apt-get purge -y --auto-remove wget
32+
COPY --from=tmp --chown=supertokens /usr/lib/supertokens /usr/lib/supertokens
33+
COPY --from=tmp --chown=supertokens /usr/bin/supertokens /usr/bin/supertokens
34+
COPY ./supertokens-core/.github/helpers/docker/postgresql/docker-entrypoint.sh /usr/local/bin/
35+
RUN echo "$(md5sum /usr/lib/supertokens/config.yaml | awk '{ print $1 }')" >> /CONFIG_HASH
36+
RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
37+
EXPOSE 3567
38+
USER "supertokens"
39+
ENTRYPOINT ["docker-entrypoint.sh"]
40+
CMD ["supertokens", "start"]

0 commit comments

Comments
 (0)