Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. # Stage I. building Gatsby & compiling static files #
  2. FROM node:13.8.0-alpine AS builder
  3. RUN apk update && \
  4. apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing fftw-dev gcc g++ make libc6-compat && \
  5. apk add git && \
  6. apk add python && \
  7. rm -rf /var/cache/apk/*
  8. RUN mkdir -p /site
  9. WORKDIR /site
  10. VOLUME /site
  11. COPY ./entry.sh /
  12. COPY ./test /site
  13.  
  14. #RUN pwd
  15. #RUN npm install
  16. #RUN gatsby build
  17. RUN chmod +x /entry.sh
  18. RUN ["/entry.sh"]
  19.  
  20. ## Stage II. serving static file with nginx #
  21. FROM ubuntu:latest
  22. RUN apt update && apt -y install curl apt-transport-https language-pack-en-base software-properties-common tzdata
  23. RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
  24. RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
  25. RUN ln -fs /usr/share/zoneinfo/Europe/Riga /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
  26. RUN apt update && apt upgrade -y && apt install -y vim nano git yarn nginx bzip2
  27. EXPOSE 80
  28. COPY --from=builder /site /var/www/html
  29. CMD ["/etc/init.d/nginx start"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement