Skip to content

Commit

Permalink
Merge pull request #28 from panxiao81/fix-container
Browse files Browse the repository at this point in the history
Fix container
  • Loading branch information
xiangsx authored May 12, 2023
2 parents 451cb90 + e9cd4f4 commit 4b5f32f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 19 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
FROM node:18.16.0

RUN mkdir -p /usr/src/app
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -y \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libasound2 \
&& rm -rf /var/lib/apt/lists/*

USER 1000

WORKDIR /usr/src/app

COPY package.json /usr/src/app/
COPY --chown=1000 package.json /usr/src/app/

RUN npm i --registry=https://registry.npm.taobao.org

COPY . /usr/src/app
COPY --chown=1000 . /usr/src/app

EXPOSE 3000

Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ services:
ports:
- "3000:3000"
restart: always
cap_add:
- "SYS_ADMIN"
environment:
# - TZ=Asia/Shanghai
- http_proxy=${http_proxy}
Expand Down

0 comments on commit 4b5f32f

Please sign in to comment.