From 815f2d58c5942f3caec8f4c83b0dc3ba1cb0c0c7 Mon Sep 17 00:00:00 2001 From: Brian Cunnie Date: Sat, 26 Jul 2025 17:52:39 -0700 Subject: [PATCH] Dockerfile refresh - Even though I don't use BOSH anymore, I couldn't change the image name "fedora-golang-bosh" because it's used in too many places - Bumped BOSH to the latest version - reformatted via VS Code; it looks like everything has changed, but the changes were actually minor - Spent far too much time trying to get Powerlevel10k's gitstatusd loaded during build instead of when the container was run, but I gave up after several attempts - replaced "fasd" with "autojump" - deprecated the MAINTAINER directive in favor of the LABEL directive --- Docker/fedora-golang-bosh/Dockerfile | 105 +++++++++++------------ Docker/fedora-ruby-bind-utils/Dockerfile | 2 +- Docker/sslip.io-dns-server/Dockerfile | 2 +- 3 files changed, 52 insertions(+), 57 deletions(-) diff --git a/Docker/fedora-golang-bosh/Dockerfile b/Docker/fedora-golang-bosh/Dockerfile index b072e72..16b9923 100644 --- a/Docker/fedora-golang-bosh/Dockerfile +++ b/Docker/fedora-golang-bosh/Dockerfile @@ -14,67 +14,55 @@ LABEL org.opencontainers.image.authors="Brian Cunnie " RUN dnf update -y; \ dnf groupinstall -y "Development Tools"; \ dnf install -y \ - bind-utils \ - binutils \ - btrfs-progs \ - direnv \ - etcd \ - fd-find \ - gcc-g++ \ - git \ - golang \ - htop \ - iproute \ - iputils \ - jq \ - mysql-devel \ - neovim \ - net-tools \ - nmap-ncat \ - npm \ - openssl-devel \ - python \ - redhat-rpm-config \ - ripgrep \ - ruby \ - ruby-devel \ - rubygems \ - socat \ - strace \ - tcpdump \ - tmux \ - wget \ - zlib-devel \ - zsh \ - zsh-lovers \ - zsh-syntax-highlighting \ - ; - -RUN mkdir ~/workspace; \ - cd ~/workspace; \ - git clone https://github.com/clvv/fasd.git; \ - cd fasd; \ - sudo make install; \ - echo 'eval "\$(fasd --init posix-alias zsh-hook)"' >> ~/.zshrc; \ - echo 'alias z='fasd_cd -d' # cd, same functionality as j in autojump' >> ~/.zshrc \ -EOF - -RUN echo "" | SHELL=/usr/bin/zsh /usr/bin/zsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"; \ - sed -i 's/robbyrussell/agnoster/' ~/.zshrc; \ - echo 'export EDITOR=nvim' >> ~/.zshrc; \ - echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.zshrc - -# amd64, arm64 (so I can run on AWS graviton2, natively on M1, M2 macs) -ARG TARGETARCH - -RUN curl -L https://github.com/cloudfoundry/bosh-cli/releases/download/v7.5.2/bosh-cli-7.5.2-linux-${TARGETARCH} -o /usr/local/bin/bosh; \ - chmod +x /usr/local/bin/bosh + autojump-zsh \ + bind-utils \ + binutils \ + btrfs-progs \ + cmake \ + direnv \ + etcd \ + fd-find \ + gcc-g++ \ + git \ + golang \ + htop \ + iproute \ + iputils \ + jq \ + mysql-devel \ + neovim \ + net-tools \ + nmap-ncat \ + npm \ + openssl-devel \ + python \ + redhat-rpm-config \ + ripgrep \ + ruby \ + ruby-devel \ + rubygems \ + socat \ + strace \ + tcpdump \ + tmux \ + wget \ + zlib-devel \ + zsh \ + zsh-lovers \ + zsh-syntax-highlighting \ + ; RUN dnf install -y dnf-plugins-core; \ dnf-3 config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo; \ dnf -y install vault; \ setcap -r /usr/bin/vault +# amd64, arm64 (so I can run on AWS graviton2, natively on M{1,2,3,4} macs) +ARG TARGETARCH + +RUN curl -L https://github.com/cloudfoundry/bosh-cli/releases/download/v7.9.7/bosh-cli-7.9.7-linux-${TARGETARCH} -o /usr/local/bin/bosh; \ + chmod +x /usr/local/bin/bosh + # https://packages.cloudfoundry.org/stable?release=redhat64&version=8.7.8&source=github-rel # https://packages.cloudfoundry.org/stable?release=redhataarch64&version=8.7.8&source=github-rel RUN ARCH=${TARGETARCH/amd64/64}; ARCH=${ARCH/arm64/aarch64} ; \ @@ -83,4 +71,11 @@ RUN ARCH=${TARGETARCH/amd64/64}; ARCH=${ARCH/arm64/aarch64} ; \ RUN CGO_ENABLED=0 GOBIN=/usr/local/bin go install github.com/onsi/ginkgo/v2/ginkgo@latest +RUN echo "" | SHELL=/usr/bin/zsh /usr/bin/zsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"; \ + echo 'export EDITOR=nvim' >> ~/.zshrc; \ + echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.zshrc + +RUN echo '[ -s /etc/profile.d/autojump.sh ] && . /etc/profile.d/autojump.sh' >> ~/.zshrc; \ + echo 'alias z=j' >> ~/.zshrc + CMD [ "/usr/bin/zsh" ] diff --git a/Docker/fedora-ruby-bind-utils/Dockerfile b/Docker/fedora-ruby-bind-utils/Dockerfile index 5d41d8c..d68cd9b 100644 --- a/Docker/fedora-ruby-bind-utils/Dockerfile +++ b/Docker/fedora-ruby-bind-utils/Dockerfile @@ -1,7 +1,7 @@ # cunnie/fedora-ruby-bind-utils FROM fedora -MAINTAINER Brian Cunnie +LABEL org.opencontainers.image.authors="Brian Cunnie " # need ruby to run dns-check.rb & bind-utils for dig & nslookup RUN dnf update -y; \ diff --git a/Docker/sslip.io-dns-server/Dockerfile b/Docker/sslip.io-dns-server/Dockerfile index 91f18f0..b100f29 100644 --- a/Docker/sslip.io-dns-server/Dockerfile +++ b/Docker/sslip.io-dns-server/Dockerfile @@ -27,7 +27,7 @@ RUN dnf install -y bind-utils ARG TARGETARCH # amd64, arm64 (so I can run on AWS graviton2) RUN curl -f -L https://github.com/cunnie/sslip.io/releases/download/4.1.1/sslip.io-dns-server-linux-$TARGETARCH \ - -o /usr/sbin/sslip.io-dns-server; \ + -o /usr/sbin/sslip.io-dns-server; \ chmod 755 /usr/sbin/sslip.io-dns-server ENTRYPOINT ["/usr/sbin/sslip.io-dns-server"]