Skip to content

Commit

Permalink
clean up disk space as we build
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Jan 1, 2024
1 parent 1711f6a commit 990a183
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
ghcr_repo_owner: ${{ github.repository_owner }}
ghcr_repo: ${{ github.repository }}
build_with_tmpfs: true
get_version_method: cargo_toml_file_in_repo:file=/Cargo.toml
get_version_method: git_commit_hash_short
# set build_latest to true if github.event.inputs.use_test_image is false
build_latest: true
docker_latest_tag: test
Expand Down
22 changes: 20 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ RUN set -x && \

RUN set -x && \
git clone https://github.com/sdr-enthusiasts/acars-bridge.git . && \
cargo build --release
cargo build --release && \
# clean up the apt-cache
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
cp /tmp/acars-bridge/target/release/acars-bridge . && \
cargo clean


FROM ghcr.io/sdr-enthusiasts/docker-baseimage:acars-decoder

Expand Down Expand Up @@ -62,6 +68,8 @@ RUN set -x && \
make install && \
ldconfig && \
popd && popd && \
# remove the source code
rm -rf /src/airspyone_host && \
# Deploy SoapySDR
git clone https://github.com/pothosware/SoapySDR.git /src/SoapySDR && \
pushd /src/SoapySDR && \
Expand All @@ -75,6 +83,8 @@ RUN set -x && \
make install && \
popd && popd && \
ldconfig && \
# remove the source code
rm -rf /src/SoapySDR && \
# Deploy SoapyRTLTCP
git clone https://github.com/pothosware/SoapyRTLTCP.git /src/SoapyRTLTCP && \
pushd /src/SoapyRTLTCP && \
Expand All @@ -85,6 +95,8 @@ RUN set -x && \
make install && \
popd && popd && \
ldconfig && \
# remove the source code
rm -rf /src/SoapyRTLTCP && \
# Deploy SoapyRTLSDR
git clone https://github.com/pothosware/SoapyRTLSDR.git /src/SoapyRTLSDR && \
pushd /src/SoapyRTLSDR && \
Expand All @@ -97,6 +109,8 @@ RUN set -x && \
make install && \
popd && popd && \
ldconfig && \
# remove the source code
rm -rf /src/SoapyRTLSDR && \
# install sdrplay support for soapy
git clone https://github.com/pothosware/SoapySDRPlay.git /src/SoapySDRPlay && \
pushd /src/SoapySDRPlay && \
Expand All @@ -108,6 +122,8 @@ RUN set -x && \
popd && \
popd && \
ldconfig && \
# remove the source code
rm -rf /src/SoapySDRPlay && \
# Deploy Airspy
git clone https://github.com/pothosware/SoapyAirspy.git /src/SoapyAirspy && \
pushd /src/SoapyAirspy && \
Expand All @@ -119,6 +135,8 @@ RUN set -x && \
popd && \
popd && \
ldconfig && \
# remove the source code
rm -rf /src/SoapyAirspy && \
# acarsdec
#git clone --depth 1 --single-branch --branch master https://github.com/TLeconte/acarsdec /src/acarsdec && \
git clone --depth 1 --single-branch --branch master https://github.com/wiedehopf/acarsdec.git /src/acarsdec && \
Expand All @@ -138,7 +156,7 @@ RUN set -x && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*

COPY rootfs/ /
COPY --from=builder /tmp/acars-bridge/target/release/acars-bridge /opt/acars-bridge
COPY --from=builder /tmp/acars-bridge/acars-bridge /opt/acars-bridge

# ENTRYPOINT [ "/init" ]

Expand Down

0 comments on commit 990a183

Please sign in to comment.