add configuration to use vuejs sample with Docker Dev Environments feature (#253)

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
Guillaume Lours
2022-07-12 12:13:43 +02:00
committed by GitHub
parent 6ac068dfc6
commit 34115dcd3c
4 changed files with 37 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
FROM node:14.4.0-alpine
# syntax=docker/dockerfile:1.4
FROM --platform=$BUILDPLATFORM node:14.4.0-alpine AS development
RUN mkdir /project
WORKDIR /project
@@ -9,3 +10,18 @@ RUN yarn global add @vue/cli
RUN yarn install
ENV HOST=0.0.0.0
CMD ["yarn", "run", "serve"]
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 ["yarn", "run", "serve"]