Skip to content

Commit

Permalink
update to alpine 3.19
Browse files Browse the repository at this point in the history
* bump versions
* use venv
  • Loading branch information
mindw committed Jan 23, 2024
1 parent 2263e4d commit 332c7db
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 32 deletions.
1 change: 1 addition & 0 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ alias where='which -a'
complete -F __start_kubectl k

export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
export PATH="/root/venv/bin:$PATH"
69 changes: 37 additions & 32 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ALPINE_VERSION=3.18
ARG ALPINE_VERSION=3.19

# build the final image
FROM alpine:${ALPINE_VERSION}
Expand Down Expand Up @@ -151,11 +151,16 @@ RUN set -ex; \

SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]

# let's install httpie, httpx, ipython and jc
RUN pip3 install --upgrade --no-cache-dir httpx[cli,brotli,http2,socks] jc
# as of Alpine 3.19 root
RUN python3 -m virtualenv --system-site-packages /root/venv

# let's install httpx, ipython and jc
RUN \
PATH="/root/venv/bin:$PATH"; \
python -m pip install --upgrade --no-cache-dir httpx[cli,brotli,http2,socks] jc

# Installing calicoctl
ARG CALICOCTL_VERSION=v3.26.1
ARG CALICOCTL_VERSION=v3.27.0
RUN \
wget -q https://github.com/projectcalico/calico/releases/download/${CALICOCTL_VERSION}/calicoctl-linux-amd64 -O /usr/local/bin/calicoctl; \
chmod +x /usr/local/bin/calicoctl
Expand All @@ -166,18 +171,18 @@ RUN \
kubectl krew install cert-manager ctx explore get-all oidc-login node-shell ns relay resource-capacity sniff topology

# Installing grpcurl
ARG GRPCURL_VERSION=1.8.7
ARG GRPCURL_VERSION=1.8.9
RUN \
curl --fail --silent -L https://github.com/fullstorydev/grpcurl/releases/download/v${GRPCURL_VERSION}/grpcurl_${GRPCURL_VERSION}_linux_x86_64.tar.gz | \
tar zx grpcurl; \
tar zx --no-same-owner grpcurl; \
chmod +x grpcurl; \
mv grpcurl /usr/local/bin

# Installing Fortio
ARG FORTIO_VERSION=1.54.3
ARG FORTIO_VERSION=1.63.2
RUN \
curl --fail --silent -L "https://github.com/fortio/fortio/releases/download/v${FORTIO_VERSION}/fortio-linux_amd64-${FORTIO_VERSION}.tgz" | \
tar zx --strip-components=2 usr/bin/fortio; \
tar zx --no-same-owner --strip-components=2 usr/bin/fortio; \
chmod +x fortio; \
mv fortio /usr/local/bin

Expand All @@ -189,42 +194,42 @@ RUN \
#RUN modprobe tun; \
# echo tun >>/etc/modules;

# setting up podman - https://github.com/containers/podman/blob/main/contrib/podmanimage/stable/Containerfile
RUN useradd podman; \
echo -e "podman:1:999\npodman:1001:64535" > /etc/subuid; \
echo -e "podman:1:999\npodman:1001:64535" > /etc/subgid;
# setting up podman - https://github.com/containers/podman/blob/main/contrib/podmanimage/stable/Containerfile
#RUN useradd podman; \
#echo -e "podman:1:999\npodman:1001:64535" > /etc/subuid; \
#echo -e "podman:1:999\npodman:1001:64535" > /etc/subgid;

ARG _REPO_URL="https://raw.githubusercontent.com/containers/podman/main/contrib/podmanimage/stable"
ADD $_REPO_URL/containers.conf /etc/containers/containers.conf
ADD $_REPO_URL/podman-containers.conf /home/podman/.config/containers/containers.conf
#ARG _REPO_URL="https://raw.githubusercontent.com/containers/podman/main/contrib/podmanimage/stable"
#ADD $_REPO_URL/containers.conf /etc/containers/containers.conf
#ADD $_REPO_URL/podman-containers.conf /home/podman/.config/containers/containers.conf

RUN mkdir -p /home/podman/.local/share/containers && \
chown podman:podman -R /home/podman && \
chmod 644 /etc/containers/containers.conf
#RUN mkdir -p /home/podman/.local/share/containers && \
# chown podman:podman -R /home/podman && \
# chmod 644 /etc/containers/containers.conf

# Copy & modify the defaults to provide reference if runtime changes needed.
# Changes here are required for running with fuse-overlay storage inside container.
RUN sed -e 's|^#mount_program|mount_program|g' \
-e '/additionalimage.*/a "/var/lib/shared",' \
-e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' \
/usr/share/containers/storage.conf \
> /etc/containers/storage.conf
#RUN sed -e 's|^#mount_program|mount_program|g' \
# -e '/additionalimage.*/a "/var/lib/shared",' \
# -e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' \
# /usr/share/containers/storage.conf \
# > /etc/containers/storage.conf

# Note VOLUME options must always happen after the chown call above
# RUN commands can not modify existing volumes
#VOLUME /var/lib/containers
#VOLUME /home/podman/.local/share/containers

RUN mkdir -p /var/lib/shared/overlay-images \
/var/lib/shared/overlay-layers \
/var/lib/shared/vfs-images \
/var/lib/shared/vfs-layers && \
touch /var/lib/shared/overlay-images/images.lock && \
touch /var/lib/shared/overlay-layers/layers.lock && \
touch /var/lib/shared/vfs-images/images.lock && \
touch /var/lib/shared/vfs-layers/layers.lock
#RUN mkdir -p /var/lib/shared/overlay-images \
# /var/lib/shared/overlay-layers \
# /var/lib/shared/vfs-images \
# /var/lib/shared/vfs-layers && \
# touch /var/lib/shared/overlay-images/images.lock && \
# touch /var/lib/shared/overlay-layers/layers.lock && \
# touch /var/lib/shared/vfs-images/images.lock && \
# touch /var/lib/shared/vfs-layers/layers.lock

ENV _CONTAINERS_USERNS_CONFIGURED=""
#ENV _CONTAINERS_USERNS_CONFIGURED=""

# Settings
ADD motd /etc/motd
Expand Down

0 comments on commit 332c7db

Please sign in to comment.