parent
23b6c592b0
commit
21e89dea55
@ -0,0 +1,20 @@
|
|||||||
|
FROM node:20-alpine3.17
|
||||||
|
|
||||||
|
# Install basic development tools
|
||||||
|
# RUN apt update \
|
||||||
|
# && apt install -y less sudo \
|
||||||
|
# && apt install -y php \
|
||||||
|
# && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||||
|
# && php composer-setup.php \
|
||||||
|
# && php -r "unlink('composer-setup.php');" \
|
||||||
|
# && mv composer.phar /usr/local/bin/composer
|
||||||
|
|
||||||
|
|
||||||
|
# # Ensure default `node` user has access to `sudo`
|
||||||
|
# ARG USERNAME=node
|
||||||
|
# RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
||||||
|
# && chmod 0440 /etc/sudoers.d/$USERNAME
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Set `DEVCONTAINER` environment variable to help with orientation
|
||||||
|
ENV DEVCONTAINER=true
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
// See https://containers.dev/implementors/json_reference/ for configuration reference
|
||||||
|
{
|
||||||
|
"name": "Slash Shop H5 Dev",
|
||||||
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile"
|
||||||
|
},
|
||||||
|
"workspaceMount": "source=${localWorkspaceFolder},target=/app,type=bind",
|
||||||
|
"workspaceFolder": "/app",
|
||||||
|
"remoteUser": "root"
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
### Dockerfile in shop-h5
|
||||||
|
FROM node:20-alpine3.17
|
||||||
|
# make the 'app' folder the current working directory
|
||||||
|
WORKDIR /app
|
||||||
|
# copy both 'package.json' and 'package-lock.json' (if available)
|
||||||
|
COPY package*.json ./
|
||||||
|
# install project dependencies
|
||||||
|
RUN npm install
|
||||||
|
EXPOSE 8080 #容器建立後,其預設開啟 8080 對外
|
||||||
Loading…
Reference in new issue