Converted demo to use Docker Compose

This commit is contained in:
Kevin Naidoo
2023-11-17 16:04:52 +01:00
parent 630016870a
commit 8f829b17c0
19 changed files with 266 additions and 305 deletions

26
web.Dockerfile Normal file
View File

@ -0,0 +1,26 @@
# syntax=docker/dockerfile:1.4
FROM --platform=$BUILDPLATFORM node:20-alpine AS development
RUN mkdir /project
WORKDIR /project
COPY . .
RUN npm install -g @vue/cli
RUN npm install
ENV HOST=0.0.0.0
CMD ["npm", "run", "dev"]
FROM development as dev-envs
RUN <<EOF
apk update
apk add git
EOF
RUN <<EOF
addgroup -S docker
adduser -S --shell /bin/bash --ingroup docker vscode
EOF
# install Docker tools (cli, buildx, compose)
COPY --from=gloursdocker/docker / /
CMD ["npm", "run", "dev"]