-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerFile.U
More file actions
60 lines (48 loc) · 1.69 KB
/
DockerFile.U
File metadata and controls
60 lines (48 loc) · 1.69 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
# from debian stretch 9.8, node 10
FROM node
# 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
# copy working directory into the image and set as pwd
ADD . /var/www/app
WORKDIR /var/www/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 .
COPY . .
#COPY node_modules /usr/local/lib/
#COPY public /usr/local/lib/
#COPY views /usr/local/lib/
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:/var/www/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/
# Check if it worked
#RUN phantomjs --version
# 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 . /var/www/app/
# expose port 8080 in containers of this image
EXPOSE 8081
# build the application
#RUN npm_config_user=root npm run build && gh-pages -d build
#RUN node -v
#RUN npm -v
# i am just guessing how you want your app started here, npm?
#ENTRYPOINT ["npm"]
# and then this, which makes "npm run start --host 0.0.0.0"
###CMD ["run", "start", "--host", "0.0.0.0"]
CMD [ "node", "index.js" ]