-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathalpine.docker
More file actions
38 lines (32 loc) · 784 Bytes
/
Copy pathalpine.docker
File metadata and controls
38 lines (32 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# chekote/node:latest-alpine
# chekote/node:{node version}-alpine
# chekote/node:{node version}-yarn{yarn version}-alpine
ARG YARN_VERSION=stable
ARG NODE_VERSION=lts
FROM node:${NODE_VERSION}-alpine
ARG YARN_VERSION
# install su-exec
RUN set -euxo pipefail; \
#
# Upgrade all packages \
apk update; \
apk upgrade; \
#
apk add --no-cache shadow su-exec; \
#
# verify that the binary works
su-exec nobody true; \
#
# Switch to latest stable yarn
yarn set version $YARN_VERSION; \
#
# Ensure workdir exists
mkdir /workdir; \
#
# Make sure it all works
node --version; \
npm --version; \
yarn --version;
WORKDIR /workdir
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]