Skip to content

Instantly share code, notes, and snippets.

@victorcbr
Created May 21, 2018 18:51
Show Gist options
  • Save victorcbr/174ead78ed4054cb71f84b81c330333c to your computer and use it in GitHub Desktop.
Save victorcbr/174ead78ed4054cb71f84b81c330333c to your computer and use it in GitHub Desktop.
dockerfile temp
#FROM node:alpine as builder
#MAINTAINER Victor Bredarioli <victor.bredarioli@beblue.com.br>
# Install Git
#RUN apk update && \
# apk upgrade && \
# apk add --virtual .build-deps nodejs && \
# apk add tzdata && \
# rm -rf /var/cache/apk/*
## Workdir
#WORKDIR /app
## Add current working directory
#COPY . .
## Build
#RUN npm install
#RUN npm run build
#========================== Runtime Image ==========================
FROM nginx:1.12.2-alpine as runtime
RUN apk update && rm -rf /var/cache/apk/*
RUN apk add -U tzdata && cp /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime && echo "America/Sao_Paulo" > /etc/timezone
HEALTHCHECK --start-period=10s --interval=15s --timeout=5s --retries=5 \
CMD curl -f http://127.0.0.1 || exit 1
COPY ./docker/config/default-dev.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/html
#WORKDIR /app
#COPY --from=builder /app/build /usr/share/nginx/html
COPY ./build /usr/share/nginx/html
EXPOSE 8001
EXPOSE 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment