Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docker/dockerfile-api
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ ARG APP_VERSION=0.0.0.1
ARG BUILD_TAGS="posts,experience,profile,projects,social,talks,gus,gocanto"
ARG BINARY_NAME=oullin_api

# Base image digests
ARG GOLANG_ALPINE_DIGEST=sha256:c3dc5d5e8cf34ccb2172fb8d1aa399aa13cd8b60d27bba891d18e3b436a0c5f6
ARG ALPINE_DIGEST=sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412

# Non-root user/group settings.
ARG APP_USER=appuser
ARG APP_GROUP=appgroup
Expand All @@ -34,7 +38,7 @@ ARG TZ=Asia/Singapore
# ----------------------------------------------------------------------------------------------------------------------
# BUILDER STAGE
# ----------------------------------------------------------------------------------------------------------------------
FROM golang:1.25.3-alpine3.22@sha256:c3dc5d5e8cf34ccb2172fb8d1aa399aa13cd8b60d27bba891d18e3b436a0c5f6 AS builder
FROM golang:1.25.3-alpine3.22@${GOLANG_ALPINE_DIGEST} AS builder

# Bring in the build args needed in this stage.
ARG APP_DIR
Expand Down Expand Up @@ -82,7 +86,7 @@ RUN go build \
# ----------------------------------------------------------------------------------------------------------------------
# FINAL STAGE
# ----------------------------------------------------------------------------------------------------------------------
FROM alpine:3.22@sha256:85f2b723e106c34644cd5851d7e81ee87da98ac54672b29947c052a45d31dc2f
FROM alpine:3.22@${ALPINE_DIGEST}

# Bring in the runtime args.
ARG APP_USER
Expand Down
Loading