Free tool · no signup

    Go Dockerfile for Oracle Cloud ARM

    A statically linked Go binary in a scratch image — a few megabytes, instant boot, negligible memory. Built for Ampere A1 (arm64), listens on port 8080, and starts with ./server.

    Dockerfile
    FROM golang:1.23-alpine AS build
    WORKDIR /src
    COPY go.mod go.sum ./
    RUN go mod download
    COPY . .
    RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o /out/server ./cmd/server
    
    FROM gcr.io/distroless/static-debian12
    COPY --from=build /out/server /server
    EXPOSE 8080
    USER nonroot:nonroot
    ENTRYPOINT ["/server"]

    ARM notes for Go

    Go cross-compiles to arm64 natively and CGO_ENABLED=0 gives a fully static binary — the resulting image is often under 15 MB, the fastest thing you can deploy on an Ampere instance.

    Skip the build, network and TLS setup

    Cheaploy builds this image on your own Oracle Always Free VM, opens the ports, issues HTTPS and rolls back if health checks fail.

    Other stacks