Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dockerfile and update readme for docker image building and usage #306

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

alwqx
Copy link
Contributor

@alwqx alwqx commented Apr 28, 2024

  1. add dockerfile to build image
  2. update readme.md for run docker image

@alwqx
Copy link
Contributor Author

alwqx commented Apr 29, 2024

@XPoet please review this pr, thanks.

@alwqx alwqx changed the base branch from master to dev April 30, 2024 02:30
@alwqx
Copy link
Contributor Author

alwqx commented Apr 30, 2024

@XPoet Hi, I skipped a few details in readme about build docker image.
If you are in China mainland, you may probably build failed. You'd better change the dockerfile to below:

FROM node:lts-alpine as builder

WORKDIR /app
COPY . .
-RUN npm install --legacy-peer-deps
+RUN npm config set strict-ssl false && npm install --legacy-peer-deps --registry https://mirrors.cloud.tencent.com/npm/
RUN npm run build

FROM nginx:stable-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

npm config set strict-ssl fals for taobao.org certificate has expired

taobao_cert_expire

--registry https://mirrors.cloud.tencent.com/npm/ to speed up docker build in mainland

@alwqx alwqx changed the title feat: dockerfile feat: add dockerfile and update readme for docker image building and usage Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant