-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (32 loc) · 972 Bytes
/
Dockerfile
File metadata and controls
46 lines (32 loc) · 972 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
39
40
41
42
43
44
45
46
# BUILD IMAGE
FROM node AS build
LABEL builder=true
ENV NODE_ENV=development
## build portion that we need to add to multi-stage build
WORKDIR /build
RUN apt-get update \
&& apt-get install ruby ruby-dev devscripts debhelper build-essential curl -y \
&& npm install -g grunt-cli bower \
&& gem install compass
COPY package.json package-lock.json /build/
RUN npm install
COPY bower.json .bowerrc /build/
RUN bower install --allow-root
COPY . /build
RUN grunt clean build:dist
CMD ["npm", "run", "serve"]
HEALTHCHECK --start-period=5s \
CMD curl -I localhost:8080
# DIST IMAGE
# FROM partlab/ubuntu-arm-nodejs # (for arm systems)
FROM node AS dist
COPY --from=build /build/dist /app
COPY --from=build /build/package.json /app
WORKDIR /app/server
ENV NODE_ENV=docker
EXPOSE 8080
RUN apt-get update && apt-get install curl -y
RUN npm install --production
CMD ["node","app.js"]
HEALTHCHECK --start-period=5s \
CMD curl -I localhost:8080