setting EXPOSE 8080

This commit is contained in:
gimse 2023-11-09 20:07:04 +01:00
parent 693dc16c84
commit 58448dbdf2

View File

@ -7,9 +7,6 @@ MAINTAINER tanwenyang@aliyun.com
# Copy the vue-color-avatar file from the local directory to the /app directory inside the container # Copy the vue-color-avatar file from the local directory to the /app directory inside the container
COPY . /app COPY . /app
# Expose port 5173 of the container and allow external access to this port
EXPOSE 5173
# Change the working directory to /app # Change the working directory to /app
WORKDIR /app WORKDIR /app
@ -22,5 +19,8 @@ RUN yarn build
# Using nginx for production # Using nginx for production
FROM docker.io/nginxinc/nginx-unprivileged:1.25.1-alpine FROM docker.io/nginxinc/nginx-unprivileged:1.25.1-alpine
# Showing that port 8080 can be published
EXPOSE 8080
# Copy html from previous stage # Copy html from previous stage
COPY --from=builder /app/dist /usr/share/nginx/html COPY --from=builder /app/dist /usr/share/nginx/html