-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (40 loc) · 1.28 KB
/
Copy pathDockerfile
File metadata and controls
52 lines (40 loc) · 1.28 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
# FROM ubuntu:18.04
# RUN apt update
# RUN apt install npm -y
# #install node 12.22
# RUN apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
# RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
# RUN apt install nodejs -y
# RUN apt -y install gcc g++ make
# RUN node -v
# # RUN nvm use 12.22
# #Install tesseract
# RUN apt-get install tesseract-ocr -y
# COPY ./eng.traineddata /usr/share/tesseract-ocr/4.00/tessdata/
# RUN ls /usr/share/tesseract-ocr/4.00/tessdata/
# RUN mkdir -p /usr/src/app
# WORKDIR /usr/src/app
# COPY ./package.json /usr/src/app/
# RUN npm install && npm cache clean --force
# COPY ./ /usr/src/app
# ENV TZ='Asia/Ho_Chi_Minh'
# RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# RUN echo haha
# RUN echo "Asia/Ho_Chi_Minh" > /etc/timezone
# ENV PORT 4001
# EXPOSE 4001
# CMD [ "npm", "start" ]
FROM node:14.21
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY ./package.json /usr/src/app/
COPY ./package-lock.json /usr/src/app/
RUN npm install && npm cache clean --force
COPY ./ /usr/src/app
ENV TZ='Asia/Ho_Chi_Minh'
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN echo haha
RUN echo "Asia/Ho_Chi_Minh" > /etc/timezone
ENV PORT 5001
EXPOSE 5001
CMD [ "npm", "start" ]