diff --git a/Containerfile b/Containerfile index 6c1d819..79955ba 100644 --- a/Containerfile +++ b/Containerfile @@ -1,5 +1,5 @@ # Stage 1: Build -FROM golang:1.23 AS builder +FROM docker.io/golang:1.23 AS builder # Set the working directory in the container WORKDIR /app @@ -8,7 +8,7 @@ WORKDIR /app COPY go.mod go.sum ./ # Download dependencies -RUN go mod download +RUN --mount=type=secret,id=netrc,dst=/root/.netrc go mod download # Copy the entire project COPY . . diff --git a/compose.yaml b/compose.yaml index e312f66..fa14dbb 100644 --- a/compose.yaml +++ b/compose.yaml @@ -3,6 +3,10 @@ networks: maps-service-network: driver: bridge +secrets: + netrc: + file: /home/quat/.netrc + services: nats: image: docker.io/nats:latest @@ -15,6 +19,8 @@ services: maps-service: build: + secrets: + - netrc context: . dockerfile: Containerfile container_name: maps-service