Skip to content

Commit

Permalink
Use pipe fail, quote array expansion and prevent word globbing
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Jun 1, 2024
1 parent cf7535f commit 4463714
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ENV URL_MLAT_CLIENT_REPO="https://github.com/wiedehopf/mlat-client.git" \
PRIVATE_MLAT="false" \
MLAT_INPUT_TYPE="auto"

RUN set -x && \
TEMP_PACKAGES=() && \
SHELL ["/bin/bash", "-o", "pipefail", "-x"]
RUN TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
# Git and net-tools are needed to install and run @Mikenye's HealthCheck framework
KEPT_PACKAGES+=(git) && \
Expand All @@ -31,8 +31,8 @@ RUN set -x && \
# Install all these packages:
apt-get update -q -y && \
apt-get install -o Dpkg::Options::="--force-confnew" -y --no-install-recommends -q \
${KEPT_PACKAGES[@]} \
${TEMP_PACKAGES[@]} && \
"${KEPT_PACKAGES[@]}" \
"${TEMP_PACKAGES[@]}" && \
#
# Compile and Install the mlat_client
mkdir -p /git && \
Expand All @@ -45,7 +45,7 @@ RUN set -x && \
rm -rf /git && \
#
# Clean up and install POST_PACKAGES:
apt-get remove -q -y ${TEMP_PACKAGES[@]} && \
apt-get remove -q -y "${TEMP_PACKAGES[@]}" && \
# apt-get install -o Dpkg::Options::="--force-confnew" -y --no-install-recommends -q \
# ${POST_PACKAGES[@]} && \
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
Expand All @@ -63,7 +63,7 @@ COPY rootfs/ /
RUN set -x && \
branch="##BRANCH##" && \
[[ "${branch:0:1}" == "#" ]] && branch="main" || true && \
git clone --depth=1 -b $branch https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git /tmp/clone && \
git clone --depth=1 -b "$branch" https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git /tmp/clone && \
pushd /tmp/clone && \
echo "$(TZ=UTC date +%Y%m%d-%H%M%S)_$(git rev-parse --short HEAD)_$(git branch --show-current)" > /.CONTAINER_VERSION && \
popd && \
Expand Down

0 comments on commit 4463714

Please sign in to comment.