Skip to content

Commit

Permalink
preserve arch
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Nov 8, 2024
1 parent 13f8c68 commit b8fd274
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions custom/testing/ubuntu-22.04.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
FROM ubuntu:22.04


COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/01_nodoc
COPY golden-pillar-tree golden-pillar-tree
COPY golden-state-tree golden-state-tree

RUN apt update -y \
&& echo 'tzdata tzdata/Areas select America' | debconf-set-selections \
&& echo 'tzdata tzdata/Zones/America select Phoenix' | debconf-set-selections \
&& DEBIAN_FRONTEND="noninteractive" apt install -y \
tar wget xz-utils vim-nox apt-utils \
&& wget https://packages.broadcom.com/artifactory/saltproject-generic/onedir/3007.1/salt-3007.1-onedir-linux-$(uname -m).tar.xz \
&& tar xvf salt-3007.1-onedir-linux-$(uname -m).tar.xz \
&& ./salt/salt-call --local --pillar-root=/golden-pillar-tree --file-root=/golden-state-tree state.apply provision \
&& rm -rf salt \
&& rm -rf salt-3007.1-onedir-linux-$(uname -m).tar.xz \
&& rm -rf golden-pillar-tree \
&& rm -rf golden-state-tree
RUN <<EOF
echo 'tzdata tzdata/Areas select America' | debconf-set-selections
echo 'tzdata tzdata/Zones/America select Phoenix' | debconf-set-selections
export DEBIAN_FRONTEND="noninteractive"
if [ $(uname -m) = "x86_64" ]; then
export ARCH=x86_64
else
export ARCH=arm64
fi
apt update -y
apt install -y tar wget xz-utils vim-nox apt-utils
wget https://packages.broadcom.com/artifactory/saltproject-generic/onedir/3007.1/salt-3007.1-onedir-linux-$ARCH.tar.xz
tar xvf salt-3007.1-onedir-linux-$ARCH.tar.xz
./salt/salt-call --local --pillar-root=/golden-pillar-tree --file-root=/golden-state-tree state.apply provision
rm -rf salt
rm -rf salt-3007.1-onedir-linux-$ARCH.tar.xz
rm -rf golden-pillar-tree
rm -rf golden-state-tree
EOF

CMD ["/bin/bash"]

0 comments on commit b8fd274

Please sign in to comment.