forked from CoreHive/redhatchallenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.Node
48 lines (35 loc) · 1.22 KB
/
Dockerfile.Node
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
FROM node:14
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
# get apt-transport-https, etc., so that we can install by https protocol
RUN apt-get update \
&& apt-get install -y \
apt-transport-https \
build-essential \
make
RUN npm install
COPY ibm-iaccess-1.1.0.14-1.0.amd64.deb ./
RUN apt-get install -y ./ibm-iaccess-1.1.0.14-1.0.amd64.deb
RUN apt-get install -y python3
# Install locally (in my case: ~/node_modules)
RUN npm_config_user=root npm set strict-ssl false
RUN npm_config_user=root npm install phantomjs-prebuilt
# Add to path
RUN export PATH=$PATH:/usr/src/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/
# install dependencies for the application
RUN npm_config_user=root npm install build-tools -g \
&& npm cache clean --force
RUN apt-get install -y unixodbc unixodbc-dev
RUN npm_config_user=root npm install -g odbc
RUN npm_config_user=root npm install -g pug express body-parser
# Bundle app source
COPY . ./
RUN export NODE_PATH=/usr/src/app/node_modules
#EXPOSE 8081
EXPOSE 3000
CMD [ "node", "database.js" ]
CMD [ "node", "index.js" ]