forked from pixano/pixano-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (23 loc) · 815 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
FROM ubuntu:20.04
# Install Node.js
RUN apt-get update && apt-get install -y --reinstall ca-certificates curl build-essential
RUN curl --silent --location https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install -y nodejs
RUN node --version
RUN npm install -g [email protected]
# Copy files for the frontend
COPY frontend frontend
# Copy files for the backend
COPY package.json package.json
COPY server server
COPY cli cli
# Build frontend and install backend dependencies
RUN npm run deps && npm run build && rm -rf frontend
EXPOSE 3000
# default files and folders (usefull when no volume can be mounted with this image)
RUN mkdir -p /data
COPY data-test /data/data-test
# ENTRYPOINT ["node", "server/server.js"]
RUN echo 'node cli/pixano "$@"' > entrypoint.sh
ENTRYPOINT ["sh", "entrypoint.sh" ]
CMD []