-
Notifications
You must be signed in to change notification settings - Fork 40
/
Dockerfile
40 lines (28 loc) · 1.17 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
# The base image is one of the offical one
FROM node:latest
# TODO: [GEN] Replace with your name and email
LABEL Daniel Palumbo <daniel.palumbo@heig-vd.ch>
# Install the required tools to run our webapp and some utils
RUN apt-get update && apt-get -y install wget curl vim && apt-get clean && npm install -g bower
# We copy the application and make sure the dependencies are installed before
# other operations. Doing so will reduce the time required to build this image
# as downloading NPM dependencies can be quite long.
COPY app /backend/app
RUN cd /backend/app && npm install && bower install --allow-root
# TODO: [S6] Install
# TODO: [Serf] Install
# TODO: [S6] Replace the two following instructions
# Copy the starting script and make it executable
COPY scripts /scripts/
RUN chmod +x /scripts/*.sh
# TODO: [Serf] Add Serf S6 setup
# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# TODO: [Serf] Expose ports
# Expose the web application port
EXPOSE 3000
# Define an environment variable for the role of the container
ENV ROLE backend
# TODO: [S6] Replace the following instruction
# Command executed when the container starts
CMD [ "/scripts/run.sh" ]