ohif-viewer/dockerfile

26 lines
682 B
Plaintext
Raw Normal View History

2019-01-30 19:36:25 +01:00
# Stage 1: Build the application
# docker build -t ohif/viewer:latest .
FROM node:11.2.0-slim as builder
2019-04-24 14:00:03 +02:00
# RUN apt-get update && apt-get install -y git yarn
2019-01-30 19:36:25 +01:00
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
2019-04-24 14:00:03 +02:00
2019-01-30 19:36:25 +01:00
COPY package.json /usr/src/app/package.json
COPY yarn.lock /usr/src/app/yarn.lock
ADD . /usr/src/app/
RUN yarn install
RUN yarn run build:web
2019-04-24 14:00:03 +02:00
# # Stage 2: Bundle the built application into a Docker container
# # which runs Nginx using Alpine Linux
2019-01-30 19:36:25 +01:00
FROM nginx:1.15.5-alpine
RUN rm -rf /etc/nginx/conf.d
COPY conf /etc/nginx
COPY --from=builder /usr/src/app/public /usr/share/nginx/html
2019-01-30 19:36:25 +01:00
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]