-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (26 loc) · 868 Bytes
/
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
FROM node:20.4-alpine3.18
MAINTAINER [email protected]
ENV NAME rw-lp
ENV USER microservice
RUN apk update && apk upgrade && apk add --no-cache --update bash git
RUN addgroup $USER && adduser -s /bin/bash -D -G $USER $USER
RUN yarn global add bower gulp
RUN mkdir -p /opt/$NAME
COPY package.json /opt/$NAME/package.json
COPY yarn.lock /opt/$NAME/yarn.lock
COPY bower.json /opt/$NAME/bower.json
RUN cd /opt/$NAME && yarn
RUN cd /opt/$NAME && bower install --allow-root
COPY ./app /opt/$NAME/app
COPY ./test /opt/$NAME/test
COPY Gruntfile.js /opt/$NAME/Gruntfile.js
COPY gulpfile.js /opt/$NAME/gulpfile.js
COPY server.js /opt/$NAME/server.js
COPY entrypoint.sh /opt/$NAME/entrypoint.sh
WORKDIR /opt/$NAME
RUN gulp build
RUN chown -R $USER:$USER /opt/$NAME
# Tell Docker we are going to use this ports
EXPOSE 8080
USER $USER
ENTRYPOINT ["./entrypoint.sh"]