Skip to content

Commit

Permalink
update GO docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
bhagatparwinder committed Oct 1, 2024
1 parent 601982d commit 81d57e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Dockerfiles/Dockerfile.bcda_prod
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ WORKDIR /go/src/github.com/CMSgov/bcda-app
COPY go.mod go.sum tools.go ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
RUN --mount=type=cache,target=/go/pkg/mod \
cat tools.go | awk '/[\/\/] bcda/{flag=1; next} /[\/\/] end/{flag=0} flag' | awk -F '"' '{print $2}' | xargs -tI % go get %
RUN --mount=type=cache,target=/go/pkg/mod \
cat tools.go | awk '/[\/\/] bcda/{flag=1; next} /[\/\/] end/{flag=0} flag' | awk -F '"' '{print $2}' | xargs -tI % go get %

COPY . .
WORKDIR /go/src/github.com/CMSgov/bcda-app/bcda
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go install -v
go install -v

# syntax = docker/dockerfile:1-experimental
FROM golang:1.21-alpine3.20
FROM golang:1.23.1-alpine3.20
ARG ENVIRONMENT
# only add dev packages if the environment argument was set to development
RUN [ "$ENVIRONMENT" != "development" ] || apk add git openssl entr bash
Expand Down
6 changes: 3 additions & 3 deletions Dockerfiles/Dockerfile.bcdaworker_prod
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ WORKDIR /go/src/github.com/CMSgov/bcda-app
COPY go.mod go.sum tools.go ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
RUN --mount=type=cache,target=/go/pkg/mod \
cat tools.go | awk '/[\/\/] bcda/{flag=1; next} /[\/\/] end/{flag=0} flag' | awk -F '"' '{print $2}' | xargs -tI % go get %
RUN --mount=type=cache,target=/go/pkg/mod \
cat tools.go | awk '/[\/\/] bcda/{flag=1; next} /[\/\/] end/{flag=0} flag' | awk -F '"' '{print $2}' | xargs -tI % go get %

COPY . .
WORKDIR /go/src/github.com/CMSgov/bcda-app/bcdaworker
Expand All @@ -21,7 +21,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \
go install -v

# syntax = docker/dockerfile:1-experimental
FROM golang:1.21-alpine3.20
FROM golang:1.23.1-alpine3.20
ARG ENVIRONMENT
# only add dev packages if the environment argument was set to development
RUN [ "$ENVIRONMENT" != "development" ] || apk add git openssl entr bash
Expand Down
6 changes: 3 additions & 3 deletions Dockerfiles/Dockerfile.ssas
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ WORKDIR /go/src/github.com/CMSgov/bcda-app
# By pulling this step out, we can leverage Docker caching
# since our tooling/dependencies do not frequently change.
COPY go.mod go.sum tools.go ./
RUN --mount=type=cache,target=/go/pkg/mod \
cat tools.go | awk '/[\/\/] bcda/{flag=1; next} /[\/\/] end/{flag=0} flag' | awk -F '"' '{print $2}' | xargs -tI % go get %
RUN --mount=type=cache,target=/go/pkg/mod \
cat tools.go | awk '/[\/\/] bcda/{flag=1; next} /[\/\/] end/{flag=0} flag' | awk -F '"' '{print $2}' | xargs -tI % go get %

COPY . .
WORKDIR /go
Expand All @@ -26,7 +26,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go install -v ./ssas/service/main

FROM golang:1.21-alpine3.20 AS prod
FROM golang:1.23.1-alpine3.20 AS prod

RUN apk update upgrade
RUN apk add openssl
Expand Down

0 comments on commit 81d57e8

Please sign in to comment.