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
This commit is contained in:
Brian Cunnie
2025-07-26 17:52:39 -07:00
parent 4cdccc6771
commit 815f2d58c5
3 changed files with 52 additions and 57 deletions

View File

@@ -14,67 +14,55 @@ LABEL org.opencontainers.image.authors="Brian Cunnie <brian.cunnie@gmail.com>"
RUN dnf update -y; \ RUN dnf update -y; \
dnf groupinstall -y "Development Tools"; \ dnf groupinstall -y "Development Tools"; \
dnf install -y \ dnf install -y \
bind-utils \ autojump-zsh \
binutils \ bind-utils \
btrfs-progs \ binutils \
direnv \ btrfs-progs \
etcd \ cmake \
fd-find \ direnv \
gcc-g++ \ etcd \
git \ fd-find \
golang \ gcc-g++ \
htop \ git \
iproute \ golang \
iputils \ htop \
jq \ iproute \
mysql-devel \ iputils \
neovim \ jq \
net-tools \ mysql-devel \
nmap-ncat \ neovim \
npm \ net-tools \
openssl-devel \ nmap-ncat \
python \ npm \
redhat-rpm-config \ openssl-devel \
ripgrep \ python \
ruby \ redhat-rpm-config \
ruby-devel \ ripgrep \
rubygems \ ruby \
socat \ ruby-devel \
strace \ rubygems \
tcpdump \ socat \
tmux \ strace \
wget \ tcpdump \
zlib-devel \ tmux \
zsh \ wget \
zsh-lovers \ zlib-devel \
zsh-syntax-highlighting \ 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
RUN dnf install -y dnf-plugins-core; \ RUN dnf install -y dnf-plugins-core; \
dnf-3 config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo; \ dnf-3 config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo; \
dnf -y install vault; \ dnf -y install vault; \
setcap -r /usr/bin/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=redhat64&version=8.7.8&source=github-rel
# https://packages.cloudfoundry.org/stable?release=redhataarch64&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} ; \ 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 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" ] CMD [ "/usr/bin/zsh" ]

View File

@@ -1,7 +1,7 @@
# cunnie/fedora-ruby-bind-utils # cunnie/fedora-ruby-bind-utils
FROM fedora FROM fedora
MAINTAINER Brian Cunnie <brian.cunnie@gmail.com> LABEL org.opencontainers.image.authors="Brian Cunnie <brian.cunnie@gmail.com>"
# need ruby to run dns-check.rb & bind-utils for dig & nslookup # need ruby to run dns-check.rb & bind-utils for dig & nslookup
RUN dnf update -y; \ RUN dnf update -y; \

View File

@@ -27,7 +27,7 @@ RUN dnf install -y bind-utils
ARG TARGETARCH # amd64, arm64 (so I can run on AWS graviton2) 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 \ 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 chmod 755 /usr/sbin/sslip.io-dns-server
ENTRYPOINT ["/usr/sbin/sslip.io-dns-server"] ENTRYPOINT ["/usr/sbin/sslip.io-dns-server"]