Skip to content

Commit

Permalink
OBS-361: Remove tini from all Docker containers. (#3049)
Browse files Browse the repository at this point in the history
  • Loading branch information
smarnach authored Oct 28, 2024
1 parent 693c718 commit 98ac154
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 24 deletions.
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
version: '2.4'
services:
# Base container is used for development tasks like tests, linting,
# and building docs.
Expand Down Expand Up @@ -80,6 +79,7 @@ services:
groupid: ${USE_GID:-10001}
image: tecken-devcontainer
entrypoint: ["sleep", "inf"]
stop_signal: SIGKILL # Doesn't seem to respond to anything else
env_file:
- docker/config/local_dev.env
- docker/config/test.env
Expand Down Expand Up @@ -196,6 +196,7 @@ services:
ports:
- "${EXPOSE_SENTRY_PORT:-8090}:8090"
command: run --host 0.0.0.0 --port 8090
stop_signal: SIGINT
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/"]
interval: 1s
Expand All @@ -209,6 +210,9 @@ services:
image: local/tecken_oidcprovider
ports:
- "${EXPOSE_OIDC_PORT:-8080}:8080"
# The next line can be removed if this PR is included in the image we use:
# https://github.com/mozilla/docker-test-mozilla-django-oidc/pull/84
stop_signal: SIGKILL
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 2s
Expand Down
5 changes: 2 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ RUN apt-get update && \
git \
libpq-dev \
gettext \
libffi-dev \
tini && \
libffi-dev && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Expand Down Expand Up @@ -70,6 +69,6 @@ USER app
# Using /bin/bash as the entrypoint works around some volume mount issues on Windows
# where volume-mounted files do not have execute bits set.
# https://github.com/docker/compose/issues/2301#issuecomment-154450785 has additional background.
ENTRYPOINT ["tini", "--", "/bin/bash", "/app/bin/entrypoint.sh"]
ENTRYPOINT ["/bin/bash", "/app/bin/entrypoint.sh"]

CMD ["web"]
4 changes: 2 additions & 2 deletions docker/images/fakesentry/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /app/
RUN groupadd -r kent && useradd --no-log-init -r -g kent kent

RUN apt-get update && \
apt-get install -y --no-install-recommends curl tini && \
apt-get install -y --no-install-recommends curl && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Expand All @@ -21,5 +21,5 @@ RUN pip install -U 'pip>=20' && \

USER kent

ENTRYPOINT ["tini", "--", "/usr/local/bin/kent-server"]
ENTRYPOINT ["/usr/local/bin/kent-server"]
CMD ["run"]
6 changes: 1 addition & 5 deletions docker/images/oidcprovider/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
FROM mozilla/oidc-testprovider:oidc_testprovider-v0.10.7@sha256:cff948eeb665cd48a6bd343af585f4970d2788a7745ea8c84410bf80800e0ef9

RUN apt-get update && \
apt install tini && \
rm -rf /var/lib/apt/lists/*

# Modify redirect_urls specified in "fixtures.json" to fit our needs.
COPY fixtures.json /code/fixtures.json

CMD ["/usr/bin/tini", "--", "./bin/run.sh"]
CMD ["./bin/run.sh"]
11 changes: 1 addition & 10 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ RUN if [ $userid -ne 1000 ]; then \
chown app:app /app/; \
fi

# install tini
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-transport-https \
tini && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ADD frontend/yarn.lock /yarn.lock
ADD frontend/package.json /package.json
RUN yarn
Expand All @@ -43,5 +34,5 @@ EXPOSE 35729
# NOTE(willkg): use $userid here because we don't know what the user name is
USER $userid

ENTRYPOINT ["tini", "--", "/bin/bash", "/app/bin/run_frontend.sh"]
ENTRYPOINT ["/bin/bash", "/app/bin/run_frontend.sh"]
CMD ["start"]
5 changes: 2 additions & 3 deletions frontend/bin/run_frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ See https://prettier.io/docs/en/editors.html#content

case $1 in
start)
# The `| cat` is to trick Node that this is an non-TTY terminal
# then react-scripts won't clear the console.
yarn start | cat
# With CI=true react-scripts won't clear the console.
CI=true exec yarn start
;;
lint)
# The --list-different (alias -l) will error the execution if there
Expand Down

0 comments on commit 98ac154

Please sign in to comment.