Skip to content

Commit b8e8703

Browse files
authored
Merge pull request #506 from johscheuer/add-tini-to-sidecar
Add tini to sidecar image
2 parents 1994f97 + a3fb916 commit b8e8703

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

foundationdb-kubernetes-sidecar/Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ WORKDIR /var/fdb/tmp
2323
ARG FDB_VERSION=6.2.22
2424
ARG FDB_LIBRARY_VERSIONS="6.2.22 6.1.13"
2525
ARG FDB_WEBSITE=https://www.foundationdb.org
26+
# Adding tini as PID 1 https://github.com/krallin/tini
27+
ARG TINI_VERSION=v0.19.0
2628

2729
COPY website /mnt/website
2830
# FIXME: Workaround for (https://github.com/FoundationDB/fdb-kubernetes-operator/issues/252#issuecomment-643812649)
@@ -38,6 +40,12 @@ RUN apt-get update && \
3840
mv fdbbackup fdbcli fdbdr fdbmonitor fdbrestore fdbserver backup_agent dr_agent /usr/bin && \
3941
echo ${FDB_VERSION} > /var/fdb/version && mkdir -p /var/fdb/lib && \
4042
for version in $FDB_LIBRARY_VERSIONS; do curl --fail $FDB_WEBSITE/downloads/$version/linux/libfdb_c_$version.so -o /var/fdb/lib/libfdb_c_${version%.*}.so; done && \
43+
curl -LO https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-amd64 && \
44+
curl -LO https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-amd64.sha256sum && \
45+
sha256sum -c tini-amd64.sha256sum && \
46+
rm -f tini-amd64.sha256sum && \
47+
chmod +x tini-amd64 && \
48+
mv tini-amd64 /usr/bin/tini && \
4149
rm -r /var/fdb/tmp && \
4250
groupadd --gid 4059 fdb && \
4351
useradd --gid 4059 --uid 4059 --no-create-home --shell /bin/bash fdb && \
@@ -60,4 +68,5 @@ VOLUME /var/output-files
6068
USER fdb
6169

6270
ENV LISTEN_PORT 8080
63-
ENTRYPOINT ["/entrypoint.bash"]
71+
72+
ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/entrypoint.bash"]

0 commit comments

Comments
 (0)