Skip to content

Instantly share code, notes, and snippets.

@alexandrebodin
Last active December 24, 2021 15:17
Show Gist options
  • Save alexandrebodin/75b6b2d0c62d14599e5d19a6e8e26c60 to your computer and use it in GitHub Desktop.
Save alexandrebodin/75b6b2d0c62d14599e5d19a6e8e26c60 to your computer and use it in GitHub Desktop.
FROM node:10.16.0-alpine
RUN apk --no-cache add --virtual native-deps \
g++ gcc libgcc libstdc++ linux-headers autoconf automake make nasm python git && \
npm install --unsafe-perm --quiet node-gyp -g
RUN apk add --no-cache build-base binutils binutils-doc gcc-doc libtool imagemagick imagemagick-dev lcms2 fontconfig freetype zlib-dev
RUN npm install --unsafe-perm -g node-sass
RUN npm install --unsafe-perm -g yarn
# Create app directory
WORKDIR /usr/src/app
ENV GOOGLE_APPLICATION_CREDENTIALS ./google-key.json
COPY package.json ./
RUN yarn global add strapi@beta -g
COPY . .
RUN yarn install
RUN yarn build
EXPOSE 1337
CMD ["npm", "run", "production"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment