My website built with React and Gatsby.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
dwysokinski.me/Dockerfile

32 lines
574 B

FROM node:14.19.2-alpine as build-deps
ENV NODE_ENV=production
RUN apk --no-cache add shadow \
gcc \
musl-dev \
autoconf \
automake \
make \
libtool \
nasm \
tiff \
jpeg \
zlib \
zlib-dev \
file \
pkgconf
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn global add gatsby-cli@3.3.0
RUN yarn
COPY . ./
RUN yarn build
#Stage 2
FROM nginx:1.21-alpine
COPY --from=build-deps /usr/src/app/public /var/www
COPY default.conf /etc/nginx/templates/default.conf.template
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]