forked from fairbanksio/react-register
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (19 loc) · 784 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
FROM alpine
MAINTAINER Brandon Sorgdrager <Brandon.Sorgdrager@gmail.com>, Jon Fairbanks <Jon@Fairbanks.io>
# Install dependencies
RUN apk update && apk upgrade \
&& apk add git \
&& apk add nodejs-current-npm \
&& npm install -g yarn
# Create user
RUN adduser -h /react-register -s /bin/bash -S react-register
USER react-register
WORKDIR /react-register
# Download the web server and copy build files to public directory
RUN git clone https://github.com/jonfairbanks/ExpressHTTP . ; yarn install
# Clone repo and install modules
RUN mkdir tmp; cd tmp; git clone https://github.com/Fairbanks-io/react-register . ; yarn install; yarn build
# Download the web server and copy build files to public directory
RUN cp -a tmp/build/. public/
EXPOSE 3000
CMD ["yarn", "start" ]