Skip to content

Commit

Permalink
feat: 도커파일 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wonsss committed Jan 31, 2024
1 parent fb7cd7e commit 1bd0aaf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/.dockerignore
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
26 changes: 26 additions & 0 deletions frontend/Dockerfile
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" ]

0 comments on commit 1bd0aaf

Please sign in to comment.