-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
34 lines (26 loc) · 856 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
#
# This Dockerfile starts with 'node:latest' (v9.x) image and installs Java 8 SDK and Maven into it.
# Many thanks to these excellent guides for inspiration:
#
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
# https://github.com/kdvolder/docker-mvn-plus-npm/blob/master/Dockerfile
#
FROM maven:3-jdk-8
LABEL author="Sanjay Nagamangalam <sanagama2@gmail.com>"
LABEL version=1.0
# Install Node.js 9.x
RUN apt-get update && apt-get install -y apt-utils && \
curl -sL https://deb.nodesource.com/setup_9.x | bash && \
apt-get update && apt-get install -y nodejs
ENV HOMEDIR=/app
# Create app directory for our Node app
WORKDIR $HOMEDIR
# Copy over app sources
COPY . $HOMEDIR
# Install Node dependencies (also complies .ts files)
RUN npm install
RUN npm run-script build
EXPOSE 8080
# Start Node app
CMD [ "npm", "start" ]
#CMD /bin/bash