diff --git a/angular/.docker/docker-compose.yaml b/angular/.docker/docker-compose.yaml new file mode 100644 index 0000000..2910433 --- /dev/null +++ b/angular/.docker/docker-compose.yaml @@ -0,0 +1,11 @@ +services: + web: + build: + context: angular + target: dev-envs + ports: + - 4200:4200 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ./angular:/project + - /project/node_modules diff --git a/angular/angular/.dockerignore b/angular/angular/.dockerignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/angular/angular/.dockerignore @@ -0,0 +1 @@ +node_modules/ diff --git a/angular/angular/Dockerfile b/angular/angular/Dockerfile index 748e2fd..01218e7 100644 --- a/angular/angular/Dockerfile +++ b/angular/angular/Dockerfile @@ -1,4 +1,6 @@ -FROM node:17.0.1-bullseye-slim +# syntax=docker/dockerfile:1.4 + +FROM --platform=$BUILDPLATFORM node:17.0.1-bullseye-slim as builder RUN mkdir /project WORKDIR /project @@ -10,3 +12,20 @@ RUN npm ci COPY . . CMD ["ng", "serve", "--host", "0.0.0.0"] + +FROM builder as dev-envs + +RUN <