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:
Guillaume Lours
2022-07-13 10:57:34 +02:00
committed by GitHub
parent e45810975f
commit 20089c790b
4 changed files with 40 additions and 1 deletions

View File

@@ -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