Created
March 6, 2022 17:22
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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