-
Notifications
You must be signed in to change notification settings - Fork 57
/
Dockerfile
32 lines (21 loc) · 604 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
### App code
FROM quay.io/centerforopenscience/ember-base-14 AS app
COPY ./package.json ./yarn.lock ./.yarnrc ./
RUN yarn --frozen-lockfile
COPY ./ ./
ARG ASSETS_BRANCH='master'
ARG GIT_COMMIT=
ENV GIT_COMMIT=${GIT_COMMIT}
RUN git clone https://github.com/CenterForOpenScience/osf-assets.git ./public/assets/osf-assets/ \
--branch ${ASSETS_BRANCH} \
--single-branch \
&& yarn build --environment=production
### Dist
FROM node:14-alpine AS dist
RUN mkdir -p /code
WORKDIR /code
COPY --from=app /code/dist /code/dist
### Dev
FROM app AS dev
EXPOSE 4200
CMD ["yarn", "start"]