Skip to content

Commit

Permalink
fix: backend/Dockerfile to reduce vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
snyk-bot committed Sep 7, 2024
1 parent 1c74fb0 commit 2581d2f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@ RUN cd registration_api && GOFLAGS=" -tags=musl" SPEC_FILE="../dockerdeps/interf
RUN cd notification-service && GOFLAGS=" -tags=musl" SPEC_FILE="../dockerdeps/interfaces/notification-service.yaml" make all

# Start fresh from a smaller image
FROM alpine:3.9 as vaccination_api
FROM alpine:3.19.4 as vaccination_api
LABEL name=vaccination_api
RUN apk add ca-certificates
COPY --from=build_base /tmp/divoc/vaccination_api/divoc-server /app/divoc-server
COPY vaccination_api/config /config
EXPOSE 8000
CMD ["/app/divoc-server", "--scheme", "http", "--port", "8000", "--host", "0.0.0.0"]

FROM alpine:3.9 as analytics_feed
FROM alpine:3.19.4 as analytics_feed
LABEL name=analytics_feed
RUN apk add ca-certificates
COPY --from=build_base /tmp/divoc/vaccination_api/analytics_feed /app/analytics_feed
COPY vaccination_api/config /config
CMD ["/app/analytics_feed"]

FROM alpine:3.9 as certificate_processor
FROM alpine:3.19.4 as certificate_processor
LABEL name=certificate_processor
RUN apk add ca-certificates
COPY --from=build_base /tmp/divoc/vaccination_api/certificate_processor /app/certificate_processor
COPY vaccination_api/config /config
CMD ["/app/certificate_processor"]

#portal api
FROM alpine:3.9 as portal_api
FROM alpine:3.19.4 as portal_api
LABEL name=portal_api
RUN apk add ca-certificates
COPY --from=build_base /tmp/divoc/portal_api/divoc-portal-api-server /app/divoc-portal-api-server
Expand All @@ -60,7 +60,7 @@ EXPOSE 8001
CMD ["/app/divoc-portal-api-server", "--scheme", "http", "--port", "8001", "--host", "0.0.0.0"]

#registration api
FROM alpine:3.9 as registration_api
FROM alpine:3.19.4 as registration_api
LABEL name=registration_api
RUN apk add ca-certificates
COPY --from=build_base /tmp/divoc/registration_api/divoc-registration-api-server /app/divoc-registration-api-server
Expand All @@ -69,7 +69,7 @@ EXPOSE 8002
CMD ["/app/divoc-registration-api-server", "--scheme", "http", "--port", "8002", "--host", "0.0.0.0"]

#notification-service
FROM alpine:3.9 as notification-service
FROM alpine:3.19.4 as notification-service
LABEL name=notification-service
RUN apk add ca-certificates
COPY --from=build_base /tmp/divoc/notification-service/notification-service /app/notification-service
Expand All @@ -78,7 +78,7 @@ EXPOSE 8765
CMD ["/app/notification-service", "--scheme", "http", "--port", "8765", "--host", "0.0.0.0"]

#digilocker_support_api
FROM alpine:3.9 as digilocker_support_api
FROM alpine:3.19.4 as digilocker_support_api
LABEL name=digilocker_support_api
RUN apk add ca-certificates
COPY --from=build_base /tmp/divoc/vaccination_api/digilocker_support_api /app/digilocker_support_api
Expand Down

0 comments on commit 2581d2f

Please sign in to comment.