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 through apt rather than direct from github packages #329

Merged
merged 1 commit into from
Jan 21, 2022
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
20 changes: 2 additions & 18 deletions docker-image-src/4.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN addgroup --gid 7474 --system neo4j && adduser --uid 7474 --system --no-creat
COPY ./local-package/* /tmp/

RUN apt update \
&& apt install -y curl wget gosu jq \
&& apt install -y curl wget gosu jq tini \
&& curl --fail --silent --show-error --location --remote-name ${NEO4J_URI} \
&& echo "${NEO4J_SHA256} ${NEO4J_TARBALL}" | sha256sum -c --strict --quiet \
&& tar --extract --file ${NEO4J_TARBALL} --directory /var/lib \
Expand All @@ -28,22 +28,6 @@ RUN apt update \
&& ln -s /data "${NEO4J_HOME}"/data \
&& ln -s /logs "${NEO4J_HOME}"/logs \
&& mv /tmp/neo4jlabs-plugins.json /neo4jlabs-plugins.json \
&& set -eux; \
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
'amd64') \
tinisha="12d20136605531b09a2c2dac02ccee85e1b874eb322ef6baf7561cd93f93c855"; \
tiniurl="https://github.com/krallin/tini/releases/download/v0.18.0/tini"; \
;; \
'arm64') \
tinisha="7c5463f55393985ee22357d976758aaaecd08defb3c5294d353732018169b019"; \
tiniurl="https://github.com/krallin/tini/releases/download/v0.18.0/tini-arm64"; \
;; \
*) echo >&2 "Neo4j does not currently have a docker image for architecture $dpkgArch"; exit 1 ;; \
esac \
&& curl -L --fail --silent --show-error ${tiniurl} > /sbin/tini \
&& echo "${tinisha} /sbin/tini" | sha256sum -c --strict --quiet \
&& chmod +x /sbin/tini \
&& apt-get -y purge --auto-remove curl \
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -59,5 +43,5 @@ COPY docker-entrypoint.sh /docker-entrypoint.sh

EXPOSE 7474 7473 7687

ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"]
ENTRYPOINT ["tini", "-g", "--", "/docker-entrypoint.sh"]
CMD ["neo4j"]
20 changes: 2 additions & 18 deletions docker-image-src/5.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN addgroup --gid 7474 --system neo4j && adduser --uid 7474 --system --no-creat
COPY ./local-package/* /tmp/

RUN apt update \
&& apt install -y curl wget gosu jq \
&& apt install -y curl wget gosu jq tini \
&& curl --fail --silent --show-error --location --remote-name ${NEO4J_URI} \
&& echo "${NEO4J_SHA256} ${NEO4J_TARBALL}" | sha256sum -c --strict --quiet \
&& tar --extract --file ${NEO4J_TARBALL} --directory /var/lib \
Expand All @@ -28,22 +28,6 @@ RUN apt update \
&& ln -s /data "${NEO4J_HOME}"/data \
&& ln -s /logs "${NEO4J_HOME}"/logs \
&& mv /tmp/neo4jlabs-plugins.json /neo4jlabs-plugins.json \
&& set -eux; \
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
'amd64') \
tinisha="12d20136605531b09a2c2dac02ccee85e1b874eb322ef6baf7561cd93f93c855"; \
tiniurl="https://github.com/krallin/tini/releases/download/v0.18.0/tini"; \
;; \
'arm64') \
tinisha="7c5463f55393985ee22357d976758aaaecd08defb3c5294d353732018169b019"; \
tiniurl="https://github.com/krallin/tini/releases/download/v0.18.0/tini-arm64"; \
;; \
*) echo >&2 "Neo4j does not currently have a docker image for architecture $dpkgArch"; exit 1 ;; \
esac \
&& curl -L --fail --silent --show-error ${tiniurl} > /sbin/tini \
&& echo "${tinisha} /sbin/tini" | sha256sum -c --strict --quiet \
&& chmod +x /sbin/tini \
&& apt-get -y purge --auto-remove curl \
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -59,5 +43,5 @@ COPY docker-entrypoint.sh /docker-entrypoint.sh

EXPOSE 7474 7473 7687

ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"]
ENTRYPOINT ["tini", "-g", "--", "/docker-entrypoint.sh"]
CMD ["neo4j"]