Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
#3 bugfix: install dumb-init with pip
Browse files Browse the repository at this point in the history
  • Loading branch information
ismarslomic committed May 22, 2022
1 parent 3b55e34 commit 8934fd0
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,23 @@ LABEL maintainer="Ismar Slomic <[email protected]>"
ENV NODE_ENV production

# Use a lightweight init system to properly spawn the Node.js runtime process with signals support
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 /usr/local/bin/dumb-init
RUN chmod +x /usr/local/bin/dumb-init
# We use pip to install dumb-init to make sure it works on amd and arm architectures
RUN \
apk add --update \
python3 \
python3-dev \
py-pip \
build-base \
&& \
pip install dumb-init && \
apk del \
python3 \
python3-dev \
py-pip \
build-base \
&& \
rm -rf /var/cache/apk/* && \
:

# Don’t run Node.js apps as root
USER node
Expand Down

0 comments on commit 8934fd0

Please sign in to comment.