Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Stage I. building Gatsby & compiling static files #
- FROM node:13.8.0-alpine AS builder
- RUN apk update && \
- apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing fftw-dev gcc g++ make libc6-compat && \
- apk add git && \
- apk add python && \
- rm -rf /var/cache/apk/*
- RUN mkdir -p /site
- WORKDIR /site
- VOLUME /site
- COPY ./entry.sh /
- COPY ./test /site
- #RUN pwd
- #RUN npm install
- #RUN gatsby build
- RUN chmod +x /entry.sh
- RUN ["/entry.sh"]
- ## Stage II. serving static file with nginx #
- FROM ubuntu:latest
- RUN apt update && apt -y install curl apt-transport-https language-pack-en-base software-properties-common tzdata
- RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- RUN ln -fs /usr/share/zoneinfo/Europe/Riga /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
- RUN apt update && apt upgrade -y && apt install -y vim nano git yarn nginx bzip2
- EXPOSE 80
- COPY --from=builder /site /var/www/html
- CMD ["/etc/init.d/nginx start"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement