Skip to content

Commit

Permalink
Switched to Ubuntu based image
Browse files Browse the repository at this point in the history
I have all Apple Silicon hardware and arch doesn't have a ARM based
container image
  • Loading branch information
jessedearing committed Mar 13, 2024
1 parent 293d14b commit 3c5875b
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,30 @@ WORKDIR /app
COPY go-httpserver .
RUN go build .

FROM docker.io/library/archlinux:latest
FROM docker.io/library/ubuntu:latest
ENV KAFKA_VERSION=3.6.1
RUN curl -L https://www.archlinux.org/mirrorlist/\?country\=US\&protocol=http\&protocol\=https\&ip_version\=4 | sed -e 's/^#Server/Server/' -e '/^#/d' | tee /etc/pacman.d/mirrorlist && \
pacman -Syu --noconfirm && \
ln -snf /usr/share/zoneinfo/US/Pacific /etc/localtime && \
pacman --noconfirm -S dnsutils netcat curl neovim zsh jq aws-cli-v2 kubectl jre-openjdk tcpdump \
mysql postgresql rclone sshpass sysstat && \
curl -LO https://apache.osuosl.org/kafka/$KAFKA_VERSION/kafka_2.13-$KAFKA_VERSION.tgz && \
tar xzvf kafka_2.13-$KAFKA_VERSION.tgz && \
mv kafka_2.13-$KAFKA_VERSION /opt/kafka && \
rm -rf kafka_2.13-$KAFKA_VERSION.tgz && \
rm -rf /var/cache/pacman/*
RUN ln -snf /usr/share/zoneinfo/US/Pacific /etc/localtime && \
apt update && \
apt install -y zsh mariadb-client postgresql-client dnsutils netcat jq \
neovim curl awscli gnupg openjdk-21-jre-headless tcpdump rclone sysstat sudo && \
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list && \
apt update && \
apt install -y kubectl && \
curl -LO https://apache.osuosl.org/kafka/$KAFKA_VERSION/kafka_2.13-$KAFKA_VERSION.tgz && \
tar xzvf kafka_2.13-$KAFKA_VERSION.tgz && \
mv kafka_2.13-$KAFKA_VERSION /opt/kafka && \
rm -rf kafka_2.13-$KAFKA_VERSION.tgz && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/lib/dpkg/info/* && \
echo "set editing-mode vi" | tee -a /etc/inputrc && \
echo "set keymap vi" | tee -a /etc/inputrc && \
useradd -u 5000 ubuntu && \
echo "ubuntu ALL=(ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/ubuntu-root

COPY tools/check-clock-skew.sh /usr/local/bin/check-clock-skew.sh
COPY --from=http-server /app/go-httpserver /usr/local/bin/go-httpserver
COPY etc/profile.d/set-vi.sh /etc/profile.d/set-vi.sh

ENV SHELL=/usr/bin/zsh
USER 5000:5000
ENTRYPOINT ["/usr/bin/zsh"]

0 comments on commit 3c5875b

Please sign in to comment.