Skip to content

Commit e100c5f

Browse files
committed
ci: remove scratch image variant, simplify Dockerfile
Single image target only. No -scratch tags.
1 parent 0ad4e53 commit e100c5f

File tree

2 files changed

+4
-53
lines changed

2 files changed

+4
-53
lines changed

.github/workflows/release.docker.yml

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,57 +24,24 @@ jobs:
2424
username: ${{ github.actor }}
2525
password: ${{ secrets.GITHUB_TOKEN }}
2626

27-
# Default (Debian) image
28-
- id: meta-default
27+
- id: meta
2928
uses: docker/metadata-action@v5
3029
with:
3130
images: ghcr.io/hanzoai/replicate
3231
tags: |
3332
type=ref,event=branch
3433
type=ref,event=pr
35-
type=sha
36-
type=sha,format=long
3734
type=semver,pattern={{version}}
3835
type=semver,pattern={{major}}.{{minor}}
3936
4037
- uses: docker/build-push-action@v6
4138
with:
4239
context: .
43-
target: default
4440
push: true
4541
provenance: true
4642
sbom: true
4743
platforms: ${{ env.PLATFORMS }}
48-
tags: ${{ steps.meta-default.outputs.tags }}
49-
labels: ${{ steps.meta-default.outputs.labels }}
50-
build-args: |
51-
REPLICATE_VERSION=${{ env.VERSION }}
52-
53-
# Hardened (Scratch) image
54-
- id: meta-scratch
55-
uses: docker/metadata-action@v5
56-
with:
57-
images: ghcr.io/hanzoai/replicate
58-
flavor: |
59-
latest=auto
60-
suffix=-scratch
61-
tags: |
62-
type=ref,event=branch
63-
type=ref,event=pr
64-
type=sha
65-
type=sha,format=long
66-
type=semver,pattern={{version}}
67-
type=semver,pattern={{major}}.{{minor}}
68-
69-
- uses: docker/build-push-action@v6
70-
with:
71-
context: .
72-
target: hardened
73-
push: true
74-
provenance: true
75-
sbom: true
76-
platforms: ${{ env.PLATFORMS }}
77-
tags: ${{ steps.meta-scratch.outputs.tags }}
78-
labels: ${{ steps.meta-scratch.outputs.labels }}
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
7946
build-args: |
8047
REPLICATE_VERSION=${{ env.VERSION }}

Dockerfile

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
2828
dist/replicate-vfs.a \
2929
-lpthread -ldl -lm
3030

31-
# --- Hardened image (Scratch) ---
32-
FROM alpine:3.21 AS certs
33-
RUN apk --update add ca-certificates && \
34-
echo "nonroot:x:65532:65532:nonroot:/home/nonroot:/sbin/nologin" > /etc/minimal-passwd && \
35-
echo "nonroot:x:65532:" > /etc/minimal-group
36-
37-
FROM scratch AS hardened
38-
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
39-
COPY --from=certs /etc/minimal-passwd /etc/passwd
40-
COPY --from=certs /etc/minimal-group /etc/group
41-
COPY --from=builder /usr/local/bin/replicate /usr/local/bin/replicate
42-
USER nonroot:nonroot
43-
ENTRYPOINT ["/usr/local/bin/replicate"]
44-
CMD []
45-
46-
# --- Default image (Debian) ---
47-
FROM debian:bookworm-slim AS default
31+
FROM debian:bookworm-slim
4832

4933
RUN apt-get update && \
5034
apt-get install -y ca-certificates sqlite3 && \

0 commit comments

Comments
 (0)