From f3c71dd653fe77ee3ba2f4dee83f2fd65be4475a Mon Sep 17 00:00:00 2001 From: wenyang <86756816+wenyang0@users.noreply.github.com> Date: Wed, 12 Apr 2023 14:20:28 +0800 Subject: [PATCH] Create Dockerfile update Dockerfile --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d3e95be --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Use node:alpine3.17 image as the base image +FROM docker.io/node:alpine3.17 + +# Maintainer information +MAINTAINER tanwenyang@aliyun.com + +# Copy the vue-color-avatar file from the local directory to the /app directory inside the container +COPY ./ /app + +# Expose port 5173 of the container and allow external access to this port +EXPOSE 5173 + +# Change the working directory to /app +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 + +# 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