This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3 bugfix: install dumb-init with pip
- Loading branch information
1 parent
3b55e34
commit 8934fd0
Showing
1 changed file
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|