Skip to content

Commit

Permalink
Remove Kubernetes SHIM image
Browse files Browse the repository at this point in the history
  • Loading branch information
adalundhe committed Feb 10, 2024
1 parent 9840afc commit a16b56e
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 572 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,46 +101,3 @@ jobs:
build-args: |
VERSION=${{matrix.golang_version}}
BASE=${{env.IMAGE_OS}}
build_variant_kubernetes:
strategy:
matrix:
language_and_version: [
"python-3.10",
"python-3.11",
"python-3.12",
"node-20",
"node-21",
"golang-1.20",
"golang-1.21",
"golang-1.22"
]
env:
REGISTRY: corpheus91/devcontainers
IMAGE_OS: "bookworm"
runs-on: ubuntu-latest
needs: [
build_core_python,
build_core_node,
build_core_golang
]
steps:
- uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
file: kubernetes/Dockerfile.kubernetes
tags: corpheus91/devcontainers:${{matrix.language_and_version}}-kubernetes
build-args: |
IMAGE=${{env.REGISTRY}}:${{matrix.language_and_version}}-${{env.IMAGE_OS}}
29 changes: 26 additions & 3 deletions golang/Dockerfile.golang
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,30 @@ COPY resources/common_debian.sh /tmp/common_debian.sh
RUN apt update && bash /tmp/common_debian.sh "true" "${USERNAME}" "${USER_UID}" "${USER_GID}" "true" "true" "true" \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*

COPY resources/post_install.sh /usr/local/share/post_install.sh
RUN chmod +X /usr/local/share/post_install.sh

ENTRYPOINT [ "/usr/local/share/post_install.sh" ]
COPY resources/library-scripts/*.sh /tmp/library-scripts/

RUN apt-get update \
&& /bin/bash /tmp/library-scripts/docker-debian.sh "true" "/var/run/docker-host.sock" "/var/run/docker.sock" "${USERNAME}" "${USE_MOBY}" \
&& /bin/bash /tmp/library-scripts/kubectl-helm-debian.sh "latest" "latest" "none" \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/

# Script copies localhost's ~/.kube/config file into the container and swaps out
# localhost for host.docker.internal on bash/zsh start to keep them in sync.
COPY resources/copy-kube-config.sh /usr/local/share/
RUN chown ${USERNAME}:root /usr/local/share/copy-kube-config.sh \
&& echo "source /usr/local/share/copy-kube-config.sh" | tee -a /root/.bashrc /root/.zshrc /home/${USERNAME}/.bashrc >> /home/${USERNAME}/.zshrc

# [Optional] Uncomment this section to install additional OS packages.
RUN apt update \
&& apt -y install --no-install-recommends kubectx make wget

COPY resources/install_k9s.sh ./install_k9s.sh

RUN /bin/bash install_k9s.sh

# Setting the ENTRYPOINT to docker-init.sh will configure non-root access to
# the Docker socket if "overrideCommand": false is set in devcontainer.json.
# The script will also execute CMD if you need to alter startup behaviors.
ENTRYPOINT [ "/usr/local/share/docker-init.sh" ]
CMD ["sleep", "infinity" ]
40 changes: 0 additions & 40 deletions kubernetes/Dockerfile.kubernetes

This file was deleted.

31 changes: 0 additions & 31 deletions kubernetes/copy-kube-config.sh

This file was deleted.

41 changes: 0 additions & 41 deletions kubernetes/devcontainer.json

This file was deleted.

5 changes: 0 additions & 5 deletions kubernetes/library-scripts/README.md

This file was deleted.

Loading

0 comments on commit a16b56e

Please sign in to comment.