add configuration to use react-nginx sample with Docker Dev Environments feature (#269)
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
|
||||
# 1. For build React app
|
||||
FROM node:lts AS development
|
||||
|
||||
@@ -22,6 +24,22 @@ FROM development AS build
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
FROM development as dev-envs
|
||||
RUN <<EOF
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends git
|
||||
EOF
|
||||
|
||||
RUN <<EOF
|
||||
useradd -s /bin/bash -m vscode
|
||||
groupadd docker
|
||||
usermod -aG docker vscode
|
||||
EOF
|
||||
# install Docker tools (cli, buildx, compose)
|
||||
COPY --from=gloursdocker/docker / /
|
||||
CMD [ "npm", "start" ]
|
||||
|
||||
# 2. For Nginx setup
|
||||
FROM nginx:alpine
|
||||
|
||||
|
Reference in New Issue
Block a user