-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 712 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (21 loc) · 712 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
FROM node:14.15-alpine3.12
ARG TARGETPLATFORM
RUN set -eux; \
apk update ; \
case "$TARGETPLATFORM" in \
linux/arm/v7) apk add --no-cache --virtual .build-instamate curl bash python3 python2 make g++ ;; \
linux/arm64) apk add --no-cache --virtual .build-instamate curl bash python3 python2 make g++ ;; \
linux/amd64) apk add --no-cache --virtual .build-instamate curl bash make g++ ;; \
esac;
WORKDIR /starter
ENV NODE_ENV development
COPY package.json /starter/package.json
RUN npm install --production
COPY . /starter
# remove development dependencies
RUN npm prune --production
RUN set -eux; \
apk del .build-instamate; \
rm -rf /var/cache/apk/*
EXPOSE 8080
CMD ["npm","start"]