Skip to content

Commit

Permalink
Upgrade backend dependencies and base images (#4187)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
  • Loading branch information
tegioz authored Dec 10, 2024
1 parent 54d74f2 commit b1f34ad
Show file tree
Hide file tree
Showing 8 changed files with 271 additions and 259 deletions.
4 changes: 2 additions & 2 deletions cmd/ah/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build ah
FROM golang:1.23.3-alpine3.20 AS ah-builder
FROM golang:1.23.4-alpine3.21 AS ah-builder
ARG VERSION
ARG GIT_COMMIT
WORKDIR /go/src/github.com/artifacthub/ah
Expand All @@ -10,7 +10,7 @@ WORKDIR /go/src/github.com/artifacthub/ah/cmd/ah
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-X main.version=$VERSION -X main.gitCommit=$GIT_COMMIT" -o /ah .

# Final stage
FROM alpine:3.20.3
FROM alpine:3.21.0
RUN apk --no-cache add git && addgroup -S ah -g 1000 && adduser -S ah -u 1000 -G ah
USER 1000
COPY --from=ah-builder /ah /usr/local/bin
8 changes: 4 additions & 4 deletions cmd/hub/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build backend
FROM golang:1.23.3-alpine3.20 AS backend-builder
FROM golang:1.23.4-alpine3.21 AS backend-builder
WORKDIR /go/src/github.com/artifacthub/hub
COPY go.* ./
COPY cmd/hub cmd/hub
Expand All @@ -8,7 +8,7 @@ WORKDIR /go/src/github.com/artifacthub/hub/cmd/hub
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /hub .

# Build frontend
FROM node:18-alpine3.20 AS frontend-builder
FROM node:18-alpine3.21 AS frontend-builder
RUN apk --no-cache add jq
WORKDIR /web
COPY web .
Expand All @@ -17,7 +17,7 @@ RUN yarn install
RUN yarn build

# Build widget
FROM node:18-alpine3.20 AS widget-builder
FROM node:18-alpine3.21 AS widget-builder
WORKDIR /widget
COPY widget .
ENV NODE_OPTIONS=--max_old_space_size=4096
Expand All @@ -34,7 +34,7 @@ WORKDIR /docs/www
RUN hugo

# Final stage
FROM alpine:3.20.3
FROM alpine:3.21.0
RUN apk --no-cache add ca-certificates && addgroup -S hub -g 1000 && adduser -S hub -u 1000 -G hub
USER 1000
WORKDIR /home/hub
Expand Down
6 changes: 3 additions & 3 deletions cmd/scanner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build scanner
FROM golang:1.23.3-alpine3.20 AS scanner-builder
FROM golang:1.23.4-alpine3.21 AS scanner-builder
WORKDIR /go/src/github.com/artifacthub/scanner
COPY go.* ./
COPY cmd/scanner cmd/scanner
Expand All @@ -8,12 +8,12 @@ WORKDIR /go/src/github.com/artifacthub/scanner/cmd/scanner
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /scanner .

# Trivy installer
FROM alpine:3.20.3 AS trivy-installer
FROM alpine:3.21.0 AS trivy-installer
RUN apk --no-cache add curl
RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.56.1

# Final stage
FROM alpine:3.20.3
FROM alpine:3.21.0
RUN apk --no-cache add ca-certificates && addgroup -S scanner -g 1000 && adduser -S scanner -u 1000 -G scanner
USER 1000
WORKDIR /home/scanner
Expand Down
2 changes: 1 addition & 1 deletion cmd/tracker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build tracker
FROM golang:1.23.3-bullseye AS builder
FROM golang:1.23.4-bullseye AS builder
WORKDIR /tmp
ENV LIBTENSORFLOW_TGZ libtensorflow-cpu-linux-x86_64-2.11.0.tar.gz
RUN wget -q --no-check-certificate https://storage.googleapis.com/tensorflow/libtensorflow/$LIBTENSORFLOW_TGZ
Expand Down
4 changes: 2 additions & 2 deletions database/migrations/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Build tern
FROM golang:1.23.3-alpine3.20 AS tern
FROM golang:1.23.4-alpine3.21 AS tern
RUN apk --no-cache add git
RUN go install github.com/jackc/tern@latest

# Build final image
FROM alpine:3.20.3
FROM alpine:3.21.0
RUN addgroup -S db-migrator -g 1000 && adduser -S db-migrator -u 1000 -G db-migrator
USER 1000
WORKDIR /home/db-migrator
Expand Down
4 changes: 2 additions & 2 deletions database/tests/Dockerfile-db-tests
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Build tern
FROM golang:1.23.2-alpine3.20 AS tern
FROM golang:1.23.4-alpine3.21 AS tern
RUN apk --no-cache add git
RUN go get -u github.com/jackc/tern

# Build final image
FROM alpine:3.20.3
FROM alpine:3.21.0
RUN apk --no-cache add git perl-app-cpanminus postgresql-client
RUN cpanm --no-wget TAP::Parser::SourceHandler::pgTAP
RUN addgroup -S db-tests && adduser -S db-tests -G db-tests
Expand Down
Loading

0 comments on commit b1f34ad

Please sign in to comment.