Skip to content
Open
Show file tree
Hide file tree
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
14 changes: 9 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- main

pull_request:
branches:
- main

workflow_dispatch:

env:
Expand Down Expand Up @@ -55,10 +59,10 @@ jobs:
with:
context: .
file: docker/Dockerfile
# Docker images only make sense on Linux; riscv64 support in the
# alpine builder image and multi-arch manifests is available.
# distroless/cc-debian12 is used for amd64/arm64; riscv64 falls back
# to debian:sid-slim which carries glibc + libgcc for CGO binaries.
platforms: linux/amd64,linux/arm64,linux/riscv64
push: true
push: ${{ github.event_name != 'pull_request' }}
build-args: |
SVC=${{ matrix.svc }}
VERSION=${{ steps.meta.outputs.version }}
Expand Down Expand Up @@ -113,7 +117,7 @@ jobs:
# cross-compiles on the host (amd64) rather than running under QEMU.
# wasmtime releases provide amd64 and arm64 Linux binaries.
platforms: linux/amd64,linux/arm64
push: true
push: ${{ github.event_name != 'pull_request' }}
build-args: |
VERSION=${{ steps.meta.outputs.version }}
COMMIT=${{ steps.meta.outputs.commit }}
Expand Down Expand Up @@ -155,7 +159,7 @@ jobs:
file: docker/Dockerfile.proplet-wasinn
# OpenVINO backend is x86-only
platforms: linux/amd64
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.IMAGE_PREFIX }}/proplet-wasi-nn:latest
${{ env.IMAGE_PREFIX }}/proplet-wasi-nn:${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ endef

.DEFAULT_GOAL := all

manager: CGO_ENABLED := 1
manager: CGO_ENABLED := $(if $(filter riscv64,$(GOARCH)),0,1)

$(SERVICES):
$(call compile_service,$(@))
Expand Down
16 changes: 14 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.26-bookworm AS builder
FROM golang:1.26 AS builder
ARG SVC
# TARGETARCH / TARGETVARIANT are set automatically by docker buildx.
# GOARCH / GOARM can still be passed explicitly via --build-arg to keep
Expand All @@ -19,7 +19,19 @@ RUN apt-get update \
&& make $SVC GOARCH=${GOARCH} ${_goarm:+GOARM=${_goarm}} \
&& mv build/$SVC /exe

FROM gcr.io/distroless/cc-debian12
# distroless/cc-debian12 has no riscv64 manifest; fall back to debian:sid-slim
# for that platform, which provides glibc and libgcc required by CGO binaries.
FROM gcr.io/distroless/cc-debian12 AS final-amd64
FROM gcr.io/distroless/cc-debian12 AS final-arm64
FROM gcr.io/distroless/cc-debian12 AS final-arm
FROM gcr.io/distroless/cc-debian12 AS final-ppc64le
FROM gcr.io/distroless/cc-debian12 AS final-s390x
FROM debian:sid-slim AS final-riscv64
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgcc-s1 \
&& rm -rf /var/lib/apt/lists/*

FROM final-${TARGETARCH}
LABEL org.opencontainers.image.source=https://github.com/absmach/propeller
LABEL org.opencontainers.image.licenses=Apache-2.0

Expand Down