Skip to content

Commit

Permalink
success running with not disable sandbox in headless mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Anderon-hk committed Nov 5, 2023
1 parent 60e2254 commit fd142a8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",
"postCreateCommand": "pnpm install",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
Expand Down
20 changes: 13 additions & 7 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG NODE_VERSION=18.0.0 #place holder for node version

FROM node:${NODE_VERSION}-bullseye-slim as base
WORKDIR /app
USER node
COPY . .
# WORKDIR /app
# USER node
# COPY . .
# CMD npm run dev

FROM base as dev2
Expand All @@ -20,15 +20,21 @@ RUN apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 dbus dbus-x11 \
--no-install-recommends \
&& service dbus start \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -r -f audio \
&& rm -rf /var/lib/apt/lists/*

RUN groupadd -r -f audio \
&& groupadd -r -f video \
&& usermod -a G audio,video node
&& usermod -a -G audio,video node

WORKDIR /app
COPY package.json .
COPY pnpm-lock.yaml .

RUN --mount=type=bind,source=package.json,target=package.json \
# --mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
--mount=type=cache,id=pnpm,target=/pnpm/store

USER node
# RUN pnpm instal


0 comments on commit fd142a8

Please sign in to comment.