Skip to content

Commit

Permalink
build: upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
masontikhonov committed Nov 17, 2024
1 parent 9062120 commit ec1d5c3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 43 deletions.
15 changes: 2 additions & 13 deletions venona/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
FROM golang:1.21-alpine3.20 as build

FROM golang:1.21-alpine3.20 AS build
RUN apk -U add --no-cache git make ca-certificates && update-ca-certificates

ENV USER=venona
ENV UID=10001

RUN adduser \
--disabled-password \
--gecos "" \
Expand All @@ -13,31 +10,23 @@ RUN adduser \
--no-create-home \
--uid "${UID}" \
"${USER}"

WORKDIR /venona

COPY . .
RUN go mod download -x
RUN go mod verify

# compile
RUN make build

FROM alpine:3.18

FROM alpine:3.20
# copy ca-certs and user details
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /etc/passwd /etc/passwd
COPY --from=build /etc/group /etc/group

WORKDIR /home/venona
RUN chown -R venona:venona /home/venona && chmod 755 /home/venona

# copy binary
COPY --from=build /venona/venona /usr/local/bin/venona

USER venona:venona

ENTRYPOINT [ "venona" ]

CMD [ "start" ]
13 changes: 2 additions & 11 deletions venonactl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
FROM golang:1.19-alpine3.18 as build

FROM golang:1.21-alpine3.20 AS build
WORKDIR /venona

COPY go.mod .
RUN go mod download

RUN apk add git

COPY . .

ARG COMMIT

RUN VERSION=$(cat VERSION) \
DATE=$(date -u "+%Y-%m-%dT%TZ") && \
env CGO_ENABLED=0 \
go build -ldflags="-w -X github.com/codefresh-io/venona/venonactl/cmd.version=${VERSION} \
-X github.com/codefresh-io/venona/venonactl/cmd.commit=${COMMIT} -X github.com/codefresh-io/venona/venonactl/cmd.date=${DATE}" \
-o venona

FROM alpine:3.17

FROM alpine:3.20
RUN apk add --update ca-certificates

COPY --from=build /venona/venona /usr/local/bin/venona

ENTRYPOINT [ "venona" ]

CMD [ "--help" ]
14 changes: 7 additions & 7 deletions venonactl/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/codefresh-io/venona/venonactl

go 1.19
go 1.21

require (
github.com/Masterminds/semver v1.5.0
Expand Down Expand Up @@ -84,7 +84,7 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
github.com/opencontainers/runc v1.1.4 // indirect
github.com/opencontainers/runc v1.1.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
Expand All @@ -101,14 +101,14 @@ require (
github.com/subosito/gotenv v1.4.2 // indirect
github.com/xlab/treeprint v1.1.0 // indirect
go.starlark.net v0.0.0-20230302034142-4b1e35fe2254 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down
Loading

0 comments on commit ec1d5c3

Please sign in to comment.