From 45aef82cf94361f24b9da949f4e1cca473e9e0a7 Mon Sep 17 00:00:00 2001 From: ebosas Date: Tue, 2 Nov 2021 16:55:29 +0200 Subject: [PATCH] Change directories to ./ --- cache.Dockerfile | 4 ++-- database.Dockerfile | 4 ++-- server.Dockerfile | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cache.Dockerfile b/cache.Dockerfile index 5b54db8..b92ea28 100644 --- a/cache.Dockerfile +++ b/cache.Dockerfile @@ -1,10 +1,10 @@ # FROM golang:1.17-alpine AS cache FROM public.ecr.aws/bitnami/golang:1.17 AS cache WORKDIR /go/src/app -COPY go.* . +COPY go.* ./ COPY internal ./internal RUN go mod download -COPY cmd/cache . +COPY cmd/cache ./ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o cache . FROM scratch diff --git a/database.Dockerfile b/database.Dockerfile index 77bbcae..73b4c1e 100644 --- a/database.Dockerfile +++ b/database.Dockerfile @@ -1,10 +1,10 @@ # FROM golang:1.17-alpine AS database FROM public.ecr.aws/bitnami/golang:1.17 AS database WORKDIR /go/src/app -COPY go.* . +COPY go.* ./ COPY internal ./internal RUN go mod download -COPY cmd/database . +COPY cmd/database ./ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o database . FROM scratch diff --git a/server.Dockerfile b/server.Dockerfile index 8ff979b..81681e4 100644 --- a/server.Dockerfile +++ b/server.Dockerfile @@ -1,31 +1,31 @@ # FROM node:14-alpine AS react FROM public.ecr.aws/bitnami/node:16 AS react WORKDIR /usr/src/app -COPY web/react/package*.json . +COPY web/react/package*.json ./ RUN npm install -COPY web/react . +COPY web/react ./ RUN npm run build # FROM node:14-alpine AS bootstrap FROM public.ecr.aws/bitnami/node:16 AS bootstrap WORKDIR /usr/src/app -COPY web/bootstrap/package*.json . +COPY web/bootstrap/package*.json ./ RUN npm install COPY cmd/server/template ./ref/ COPY --from=react /usr/src/app/build ./ref/ -COPY web/bootstrap . +COPY web/bootstrap ./ RUN npm run css # Build container for server # FROM golang:1.17-alpine AS server FROM public.ecr.aws/bitnami/golang:1.17 AS server WORKDIR /go/src/app -COPY go.* . +COPY go.* ./ COPY internal ./internal RUN go mod download COPY --from=react /usr/src/app/build ./static/build/ COPY --from=bootstrap /usr/src/app/build ./static/build/ -COPY cmd/server . +COPY cmd/server ./ # Flag info https://golang.org/cmd/link/ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-s' -o server .