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