Skip to content
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

Install tini from apt in apollo image #199

Merged
merged 3 commits into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changes/pr199.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enhancement:
- "Install `tini` from apt instead of GitHub in apollo image - [#199](https://github.com/PrefectHQ/server/pull/199)"
17 changes: 2 additions & 15 deletions services/apollo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ ENV PREFECT_SERVER_VERSION=${PREFECT_SERVER_VERSION:-master}
ARG RELEASE_TIMESTAMP
ENV RELEASE_TIMESTAMP=$RELEASE_TIMESTAMP

# Architecture to support. Necessary for a working tini entrypoint on non-x86/64 builds
ARG ARCH
ENV ARCH=${ARCH:-amd64}

# Image Labels
LABEL maintainer="[email protected]"
LABEL org.label-schema.schema-version = "1.0"
Expand All @@ -25,25 +21,16 @@ LABEL org.label-schema.version=${PREFECT_VERSION}
LABEL org.label-schema.build-date=${RELEASE_TIMESTAMP}

RUN apt-get update \
&& apt-get install curl --no-install-recommends -y \
&& apt-get install curl tini --no-install-recommends -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install tini with checksum verification
# Once we upgrade to a newer version of Debian (Buster+), we can just `apt-get install tini`
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH} /tini-${ARCH}
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH}.sha256sum /tini.sha256sum
RUN echo "$(cat tini.sha256sum)" | sha256sum -c \
&& mv /tini-${ARCH} /tini \
&& chmod +x /tini

WORKDIR /apollo
COPY . .

RUN npm ci && \
npm run build && \
chmod +x post-start.sh

ENTRYPOINT ["/tini", "-g", "--"]
ENTRYPOINT ["tini", "-g", "--"]
CMD ["npm", "run", "serve"]