Skip to content

Instantly share code, notes, and snippets.

@joanfabregat
Created March 17, 2023 09:14
Show Gist options
  • Save joanfabregat/821ffa3409219c7b0da5798b10ec6ce9 to your computer and use it in GitHub Desktop.
Save joanfabregat/821ffa3409219c7b0da5798b10ec6ce9 to your computer and use it in GitHub Desktop.
Wekpack Docker build for a Symfony app
##################################################################################################################
# Public assets (JS, Vue, images, etc.)
##################################################################################################################
FROM node:18-bullseye AS webpack-build
# configuring Yarn
RUN mkdir -p /app/public/build
WORKDIR /app
COPY yarn.lock .
COPY package.json .
COPY composer.json .
RUN yarn install
# adding app source
COPY webpack.config.js .
COPY assets assets
COPY public public
COPY IMAGE_TAG ./
COPY tsconfig.json ./
COPY shims-vue.d.ts ./
# building app assets
#ARG NODE_OPTIONS=--openssl-legacy-provider
RUN yarn encore production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment