Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
fix arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
davehorton committed Aug 26, 2024
1 parent 1f9c03b commit 457c1db
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Free Disk Space Before Build
run: |
echo "Disk space before cleanup:"
df -h
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo apt-get clean
echo "Disk space after cleanup:"
df -h
- name: Read Environment Variables
id: env_vars
run: |
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,13 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then LIB_DIR=/usr/lib/aarch64-linux-gnu; fi
COPY --from=freeswitch /usr/local/freeswitch/ /usr/local/freeswitch/
COPY --from=freeswitch /usr/local/bin/ /usr/local/bin/
COPY --from=freeswitch /usr/local/lib/ /usr/local/lib/
COPY --from=freeswitch $LIB_DIR/ /usr/lib/

# Use environment variable LIB_DIR for the correct path based on architecture
RUN if [ "$TARGETARCH" = "arm64" ]; then \
COPY --from=freeswitch /usr/lib/aarch64-linux-gnu/ /usr/lib/; \
else \
COPY --from=freeswitch /usr/lib/x86_64-linux-gnu/ /usr/lib/; \
fi
RUN apt update && apt install -y --quiet --no-install-recommends ca-certificates libsqlite3-0 libcurl4 libpcre3 libspeex1 libspeexdsp1 libedit2 libtiff6 libopus0 libsndfile1 libshout3 \
&& ldconfig && rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit 457c1db

Please sign in to comment.