-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathdockerfile
More file actions
33 lines (24 loc) · 714 Bytes
/
dockerfile
File metadata and controls
33 lines (24 loc) · 714 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
FROM alpine:3.7
RUN apk --update --no-cache add \
nodejs \
nodejs-npm
# Bug fix for segfault ( Convert PT_GNU_STACK program header into PT_PAX_FLAGS )
RUN apk --update --no-cache add paxctl \
&& paxctl -cm $(which node)
RUN mkdir -p /usr/src/{app,bin,lib}
WORKDIR /usr/src/app
# only install production deps to keep image small
COPY package.json /usr/src/app
RUN npm install --production
RUN apk del nodejs-npm
COPY index.js /usr/src/app
COPY bin/ /usr/src/app/bin
COPY lib/ /usr/src/app/lib
COPY docker-entrypoint.sh /docker-entrypoint.sh
# env
ENV DATABASE_HOST 127.0.0.1
ENV DATABASE_USER root
ENV DATABASE_PASSWORD password
ENV DATABASE_NAME sakila
EXPOSE 80
ENTRYPOINT ["/docker-entrypoint.sh"]