diff --git a/Dockerfile b/Dockerfile index 0b48b93..fe62d98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ EXPOSE 5173 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 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 diff --git a/README-CN.md b/README-CN.md index b893010..dd1c7e4 100644 --- a/README-CN.md +++ b/README-CN.md @@ -54,7 +54,11 @@ yarn dev 你可以直接使用我已经构建好的镜像来运行 ```sh -docker run -d -t -p 5173:5173 --name vue-color-avatar --restart=always docker.io/wenyang0/vue-color-avatar:latest +docker run -d -t -p 5173:5173 \ +--name=vue-color-avatar \ +--restart=always \ +docker.io/wenyang0/vue-color-avatar:latest + ``` 或者,如果您愿意,也可以自己手动编译。 diff --git a/README.md b/README.md index 1018b93..c2a1414 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,11 @@ yarn dev You can directly run using the image I have already built. ```sh -docker run -d -t -p 5173:5173 --name vue-color-avatar --restart=always docker.io/wenyang0/vue-color-avatar:latest +docker run -d -t -p 5173:5173 \ +--name=vue-color-avatar \ +--restart=always \ +docker.io/wenyang0/vue-color-avatar:latest + ``` Or, you can manually compile it yourself if you prefer.