-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (21 loc) · 957 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
35
# VERSION 0.1
# DOCKER-VERSION 1.7.0
# AUTHOR: Antonio Lain <[email protected]>
# DESCRIPTION: Cloud Assistants application helloworld
# TO_BUILD: cafjs mkImage . gcr.io/cafjs-k8/root-helloworld
# TO_RUN: cafjs run --appImage gcr.io/cafjs-k8/root-helloworld helloworld
FROM node:18
EXPOSE 3000
RUN mkdir -p /usr/src
ENV PATH="/usr/src/node_modules/.bin:${PATH}"
RUN apt-get update && apt-get install -y rsync
ENV PATH="/usr/local/bin:${PATH}"
RUN yarn config set prefix /usr/local
RUN yarn global add caf_build [email protected] [email protected] && yarn cache clean
# fill the local cache
RUN yarn global add [email protected] [email protected] [email protected] [email protected] && yarn global remove react-dom react react-bootstrap redux
COPY . /usr/src
RUN cd /usr/src/app && yarn install --production --ignore-optional && cafjs build && yarn cache clean
WORKDIR /usr/src/app
ENTRYPOINT ["node"]
CMD [ "./index.js" ]