-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
59 lines (46 loc) · 1.31 KB
/
Dockerfile
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
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM node:10-alpine
#FROM mhart/alpine-node:4
LABEL maintainer="Predix Builder Relations"
LABEL hub="https://hub.docker.com"
LABEL org="https://hub.docker.com/u/predixedge"
LABEL repo="predix-edge-ref-app"
LABEL version="1.0.50"
LABEL support="https://forum.predix.io"
LABEL license="https://github.com/PredixDev/predix-docker-samples/blob/master/LICENSE.md"
RUN apk add git zip && \
rm -f /var/cache/apk/*
RUN npm config set strict-ssl false && \
npm install -g bower
WORKDIR /usr/src/edge-ref-app
#COPY config ./config
RUN mkdir -p ./data
RUN mkdir -p ./scripts
COPY data/compressor-specs.json ./data
COPY gulp_tasks ./gulp_tasks
COPY server ./server
COPY src ./src
COPY images ./images
COPY bower.json gulpfile.js package*.json polymer.json ./
COPY scripts/package-config.sh scripts
RUN node -v
RUN npm cache clean --force
RUN npm install
RUN npm install [email protected]
RUN bower install --allow-root
# RUN gulp dist
RUN ./node_modules/gulp/bin/gulp.js dist
RUN rm -rf ./node_modules
RUN npm install --production
RUN npm dedupe
RUN rm -rf ./bower_components
RUN rm -rf ./cache
RUN rm -rf /root/.npm
RUN rm -rf /root/.cache
RUN rm -rf /root/.gnupg
RUN rm -rf ./gulp_tasks
RUN rm -rf ./server
RUN rm -rf ./src
RUN rm -rf ./images
COPY ./scripts/entrypoint.sh .
EXPOSE 5000
ENTRYPOINT ["/usr/src/edge-ref-app/entrypoint.sh"]