From 13203de5efd0d81b6cb4129527bdbd3313528da8 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 24 Feb 2021 07:19:30 -0600 Subject: try armv7 again --- .github/workflows/ci.yml | 4 ++-- Dockerfile | 27 +++++++++++++++++++++++++-- bin/publish | 2 +- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d8c1460..74832d12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,7 +122,7 @@ jobs: if: "!startsWith(github.ref, 'refs/tags/')" uses: docker/build-push-action@v2 with: - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true build-args: | VERSION=${{ env.VERSION }} @@ -138,7 +138,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v2 with: - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true build-args: | VERSION=${{ env.VERSION }} diff --git a/Dockerfile b/Dockerfile index b6496aa4..3f515277 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts-alpine3.12 AS web +FROM node:lts-alpine3.13 AS web ARG VERSION=0.0.1.65534-local WORKDIR /slskd @@ -39,7 +39,7 @@ RUN bash ./bin/publish --no-prebuild --platform $TARGETPLATFORM --version $VERSI # -FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine AS slskd +FROM alpine:3.13 AS slskd ARG TARGETPLATFORM ARG VERSION=0.0.1.65534-local @@ -47,6 +47,29 @@ LABEL org.opencontainers.image.source=https://github.com/slskd/slskd LABEL org.opencontainers.image.licsense=AGPL-3.0 LABEL org.opencontainers.image.version=${VERSION} +# the following is a 1:1 copy of the .NET 5 runtime-deps dockerfile, which does not yet support alpine/armv7 +# review this in the future to determine if we can return to using mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine as the base +# https://github.com/dotnet/dotnet-docker/blob/56e04001eb08a0399c8887a517f2dc9a81dcdf04/src/runtime-deps/5.0/alpine3.13/amd64/Dockerfile +RUN apk add --no-cache \ + ca-certificates \ + \ + # .NET Core dependencies + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + zlib + +ENV \ + # Configure web servers to bind to port 80 when present + ASPNETCORE_URLS=http://+:80 \ + # Enable detection of running in a container + DOTNET_RUNNING_IN_CONTAINER=true \ + # Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20) + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true +# end runtime-deps + WORKDIR /slskd COPY --from=publish /slskd/dist/${TARGETPLATFORM} . diff --git a/bin/publish b/bin/publish index 519a41c8..1315e2f1 100755 --- a/bin/publish +++ b/bin/publish @@ -9,8 +9,8 @@ while test $# -gt 0; do echo 'options:' echo '-h, --help show help' echo '--no-prebuild skip build and test' - echo '--platform overrides runtime; one of: linux/amd64, linux/arm64, linux/arm/v7' echo '--runtime a valid RID (https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)' + echo '--platform one of: linux/amd64, linux/arm64, linux/arm/v7. overrides runtime.' echo '--version version for the binary. defaults to current git tag-SHA' echo '--output the output directory. defaults to ../../dist/' exit 0 -- cgit v1.2.3