-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.r2g
39 lines (28 loc) · 1008 Bytes
/
Dockerfile.r2g
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
FROM node:10
RUN apt-get -y update
RUN apt-get -y install sudo
RUN sudo apt-get -y update
RUN apt-get install -y netcat
RUN apt-get install -y rsync
RUN sudo echo "node ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
ENV FORCE_COLOR=1
ENV docker_r2g_in_container=yes
USER node
ENV USER="node"
ENV HOME="/home/node"
RUN mkdir -p /home/node/.docker_r2g_cache
RUN mkdir -p /home/node/app/node_modules
WORKDIR /home/node/app
RUN sudo chmod -R 777 /home/node
RUN sudo chown -R $(whoami) $(npm config get prefix)/lib
RUN sudo chown -R $(whoami) $(npm config get prefix)/lib/node_modules
RUN sudo chown -R $(whoami) $(npm config get prefix)/bin
RUN sudo chown -R $(whoami) $(npm config get prefix)/share
RUN sudo chown -R $(whoami) /usr/local/lib
RUN sudo chown -R $(whoami) /usr/local/etc
ARG CACHEBUST=1
RUN npm install --loglevel=warn -g "@oresoftware/docker.r2g@latest"
RUN npm install --loglevel=warn -g "@oresoftware/r2g@latest"
COPY . .
RUN sudo chmod -R 777 /home/node
ENTRYPOINT ["docker.r2g", "run"]