소스 검색

Added Dockerfile

master
Lazar Kostic 3 년 전
부모
커밋
8a21e72067
2개의 변경된 파일48개의 추가작업 그리고 0개의 파일을 삭제
  1. 12
    0
      .dockerignore
  2. 36
    0
      Dockerfile

+ 12
- 0
.dockerignore 파일 보기

@@ -0,0 +1,12 @@
# Items that don't need to be in a Docker image
# Anything not used by the build system should go here
Dockerfile
.dockerignore
.gitignore
README.md
*/.git/

# Artifacts that will be build during image creation.
# This should contain all files created during `npm run build`.
*/node_modules/
*/build/

+ 36
- 0
Dockerfile 파일 보기

@@ -0,0 +1,36 @@
FROM node:16-alpine

WORKDIR /app

COPY package*.json ./
COPY src ./
COPY public ./

RUN yarn install

# Bundle app source
COPY . .

EXPOSE 3000
CMD ["yarn", "start"]

########################################################
################## BUILD VERSION #######################
# Use a Node 16 base image
#FROM node:16-alpine
# Set the working directory to /app inside the container
#WORKDIR /app
# Copy app files
#COPY . .
# ==== BUILD =====
# Install dependencies
#RUN yarn
# Build the app
#RUN yarn run build
# ==== RUN =======
# Set the env to "production"
#ENV NODE_ENV production
# Expose the port on which the app will be running (3000 is the default that `serve` uses)
#EXPOSE 3000
# Start the app
#CMD [ "npx", "serve", "build" ]

Loading…
취소
저장