-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
bin | ||
obj | ||
.git | ||
.DS_Store | ||
build-storybook.log | ||
testOutDir |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Start your image with a node base image | ||
FROM node:18-alpine | ||
|
||
RUN rm /usr/local/bin/yarn | ||
RUN rm /usr/local/bin/yarnpkg && npm install -g yarn | ||
|
||
# The /app directory should act as the main application directory | ||
WORKDIR /app | ||
|
||
# Copy the app package and package-lock.json file | ||
COPY package*.json ./ | ||
COPY yarn.lock ./yarn.lock | ||
|
||
# Copy local directories to the current local directory of our docker image (/app) | ||
COPY . ./ | ||
|
||
# Install node packages, install serve, build the app, and remove dependencies at the end | ||
RUN yarn \ | ||
&& yarn global add serve \ | ||
&& yarn run build:prod \ | ||
&& yarn cache clean | ||
|
||
EXPOSE 3000 | ||
|
||
# Start the app using serve command | ||
CMD [ "serve", "-s", "dist" ] |