Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save goforbg/6c78a42c215092478a5b8241d6921a95 to your computer and use it in GitHub Desktop.
Save goforbg/6c78a42c215092478a5b8241d6921a95 to your computer and use it in GitHub Desktop.
Sample Docker File to Build Next JS App With Env Variables from Github Secets and Actions
FROM node:14
ARG FOO=${FOO}
ENV FOO=${FOO}
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app
RUN yarn install
COPY . /usr/src/app
RUN FOO=$FOO yarn build
EXPOSE 80
CMD ["yarn", "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment