Skip to content

Commit 97a5aba

Browse files
committed
ci: install libc in running container
1 parent 287293a commit 97a5aba

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/main.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ jobs:
101101
matrix:
102102
platform:
103103
- target: x86_64-unknown-linux-gnu
104-
command: cargo
105104
- target: aarch64-unknown-linux-gnu
106-
command: cross
107105
steps:
108106
- uses: actions/checkout@v4
109107
with:
@@ -134,7 +132,6 @@ jobs:
134132
restore-keys: |
135133
cargo-build-${{ runner.os }}-${{ matrix.platform.target }}-
136134
- name: Install cross
137-
if: ${{ matrix.platform.command == 'cross' }}
138135
uses: taiki-e/cache-cargo-install-action@caa6f48d18d42462f9c30df89e2b4f71a42b7c2c
139136
with:
140137
tool: cross
@@ -149,7 +146,7 @@ jobs:
149146
DEFAULT_MAL_CLIENT_ID: ${{ secrets.DEFAULT_MAL_CLIENT_ID }}
150147
DEFAULT_TMDB_ACCESS_TOKEN: ${{ secrets.DEFAULT_TMDB_ACCESS_TOKEN }}
151148
run: |
152-
${{ matrix.platform.command }} build --locked --target ${{ matrix.platform.target }} --release
149+
cross build --locked --target ${{ matrix.platform.target }} --release
153150
- name: Upload build artifact
154151
uses: actions/upload-artifact@v4
155152
with:
@@ -202,6 +199,7 @@ jobs:
202199
type=semver,pattern=v{{major}}.{{minor}},enable=${{ needs.pre-workflow-checks.outputs.should-release == 'true' }}
203200
type=semver,pattern=v{{major}},enable=${{ needs.pre-workflow-checks.outputs.should-release == 'true' }}
204201
type=raw,value=latest,enable=${{ needs.pre-workflow-checks.outputs.should-release == 'true' }}
202+
type=sha
205203
- name: Build and push
206204
uses: docker/build-push-action@v5
207205
with:

Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ LABEL org.opencontainers.image.description="The only self hosted tracker you wil
3434
ENV FRONTEND_UMAMI_SCRIPT_URL="https://umami.diptesh.me/script.js"
3535
ENV FRONTEND_UMAMI_WEBSITE_ID="5ecd6915-d542-4fda-aa5f-70f09f04e2e0"
3636
COPY --from=caddy:2.7.5 /usr/bin/caddy /usr/local/bin/caddy
37-
RUN apt-get update && apt-get install -y --no-install-recommends wget curl libssl3 ca-certificates procps && rm -rf /var/lib/apt/lists/*
37+
RUN apt-get update && apt-get install -y --no-install-recommends wget curl libssl3 ca-certificates procps libc6 && rm -rf /var/lib/apt/lists/*
3838
RUN npm install --global [email protected] && concurrently --version
3939
RUN useradd -m -u 1001 ryot
40-
RUN if [ "${TARGETARCH}" = "arm64" ]; then apt-get update && apt-get install -y --no-install-recommends wget && wget http://ftp.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0+deb11u1_arm64.deb && dpkg -i libssl1.1_1.1.1w-0+deb11u1_arm64.deb && rm -rf libssl1.1_1.1.1w-0+deb11u1_arm64.deb && apt-get remove -y wget && rm -rf rm -rf /var/lib/apt/lists/*; fi
40+
RUN if [ "${TARGETARCH}" = "amd64" ]; then apt-get update && apt-get install -y --no-install-recommends libssl-dev; fi
41+
RUN if [ "${TARGETARCH}" = "arm64" ]; then wget http://ftp.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0+deb11u1_arm64.deb && dpkg -i libssl1.1_1.1.1w-0+deb11u1_arm64.deb && rm -rf libssl1.1_1.1.1w-0+deb11u1_arm64.deb; fi
42+
RUN rm -rf /var/lib/apt/lists/*
4143
WORKDIR /home/ryot
4244
USER ryot
4345
COPY ci/Caddyfile /etc/caddy/Caddyfile

ci/cross-pre-build.sh

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ set -euxo pipefail
44
apt-get update
55
apt-get --assume-yes install patch
66

7+
if [[ $CROSS_TARGET == "x86_64-unknown-linux-gnu" ]]; then
8+
apt-get update && apt-get --assume-yes install libssl-dev
9+
fi
10+
711
if [[ "$CROSS_TARGET" == "aarch64-unknown-linux-gnu" ]]; then
812
dpkg --add-architecture $CROSS_DEB_ARCH
913
apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH

0 commit comments

Comments
 (0)