forked from NYPL-Simplified/docker-patron-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (20 loc) · 653 Bytes
/
Dockerfile
File metadata and controls
21 lines (20 loc) · 653 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Do a build step that compiles the code
FROM node:8 as builder
ARG PATRONWEB_REPO=https://github.com/NYPL-Simplified/circulation-patron-web.git
ARG REPO_VERSION=master
COPY . /build
RUN /build/prebuild.sh "${PATRONWEB_REPO}" "${REPO_VERSION}"
# Copy the compiled code from the builder and
# create a smaller conatiner using it.
FROM node:8-alpine
ENV NODE_ENV=production \
UID=990 \
GID=990
EXPOSE 3000
COPY . /build
COPY --from=builder /patron-web/dist /patron-web/dist
COPY --from=builder /patron-web/lib /patron-web/lib
COPY --from=builder /patron-web/package*.json /patron-web/
RUN /build/build.sh
WORKDIR /patron-web
CMD ./entrypoint.sh