-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (27 loc) · 1.11 KB
/
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
36
37
38
39
40
41
42
43
44
FROM debian:jessie-20171210 as build
LABEL maintainer="Edgar Aroutiounian <[email protected]>" \
session="Summer:2018"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -qq -y install curl build-essential apt-utils && \
rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install yarn
ARG user="iterate"
RUN groupadd -r $user && useradd --no-log-init -m -r -g $user $user
USER $user
# We make it before WORKDIR so that it
# has the right permissions of our iterate user
RUN mkdir /home/$user/application
WORKDIR /home/$user/application
# Variable expansion doesn't work
# here yet, so need to hardcode. -1 to Docker
ADD --chown=iterate:iterate ./package.json .
ADD --chown=iterate:iterate ./yarn.lock .
ADD --chown=iterate:iterate ./src ./src
ADD --chown=iterate:iterate ./public ./public
RUN yarn
CMD yarn start