forked from sonata-nfv/tng-portal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
43 lines (33 loc) · 1.27 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
##########################################################################
# Create an image based on the official Node 8.11.3 image from dockerhub #
##########################################################################
FROM node:8.11.3-jessie
# Copy the code into the container at /build
ADD . /build
# Set the working directory to /build
WORKDIR /build
# Install modules
RUN rm -rf node_modules package-lock.json
RUN npm cache clean --force
RUN npm install -g npm
RUN npm install
# Build
RUN npm run build
##########################################################################
# Create image based on the official Nginx 1.13 image from dockerhub #
##########################################################################
FROM nginx:1.13-alpine
# Copy distribution app in English to nginx files
COPY --from=0 /build/dist/tng-portal-en /usr/share/nginx/html
# Set nginx configuration from app files
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
# Enable selected environment
COPY src/config-sp.json /usr/share/nginx/html/
COPY src/config-vnv.json /usr/share/nginx/html/
COPY src/config-sdk.json /usr/share/nginx/html/
COPY src/config.json /usr/share/nginx/html/
COPY src/entrypoint.sh /
ENV PLATFORM sp
CMD ["/entrypoint.sh"]
# Expose application port
EXPOSE 4200