mirror of
https://github.com/Codennnn/vue-color-avatar.git
synced 2024-12-22 12:02:38 +00:00
working with nginx on port 8080
This commit is contained in:
parent
9197e862c5
commit
693dc16c84
12
Dockerfile
12
Dockerfile
@ -1,5 +1,5 @@
|
||||
# Use node:alpine3.17 image as the base image
|
||||
FROM docker.io/node:alpine3.17
|
||||
FROM docker.io/node:alpine3.17 as builder
|
||||
|
||||
# Maintainer information
|
||||
MAINTAINER tanwenyang@aliyun.com
|
||||
@ -16,5 +16,11 @@ WORKDIR /app
|
||||
# Set the Yarn registry to Taobao mirror and install dependencies using yarn install
|
||||
RUN yarn config set registry 'https://registry.npm.taobao.org' && yarn install && yarn cache clean
|
||||
|
||||
# Run the command to start the container, which will run the project in development mode and listen on port 5173 of address 0.0.0.0
|
||||
CMD yarn dev --host 0.0.0.0
|
||||
# Building the html code
|
||||
RUN yarn build
|
||||
|
||||
# Using nginx for production
|
||||
FROM docker.io/nginxinc/nginx-unprivileged:1.25.1-alpine
|
||||
|
||||
# Copy html from previous stage
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
Loading…
Reference in New Issue
Block a user