-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile
34 lines (20 loc) · 976 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
FROM node:14-buster
RUN mkdir /app
RUN apt-get update && apt-get install -y binutils sudo && wget -qO - "https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz" | gzip -d > /usr/local/bin/elm
#RUN apt-get update && apt-get install -y binutils sudo && wget -qO - "https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz" | gzip -d > /usr/local/bin/elm && strip /usr/local/bin/elm
#RUN apt-get update && apt-get install -y binutils sudo
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
RUN passwd -d docker
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> \
/etc/sudoers
USER docker
RUN sudo chmod +x /usr/local/bin/elm
RUN sudo chown docker:docker /app
WORKDIR /app
COPY /src/ /app
COPY package*.json /app/
RUN npm install
RUN sudo npm run build && sudo npm run build:player
FROM nginx:1.15
COPY --from=0 /app /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/conf.d/default.conf