From 0b2362dce73f684c30c71b00425e82e9897da131 Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Mon, 30 Sep 2024 14:29:35 -0700 Subject: [PATCH 1/6] dbg lazyvim plugin deps --- docker/slim/Dockerfile | 9 +++++++-- docker/slim/rootfs/etc/skel/.bashrc | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docker/slim/Dockerfile b/docker/slim/Dockerfile index 6c4f3b5..8ede57b 100644 --- a/docker/slim/Dockerfile +++ b/docker/slim/Dockerfile @@ -64,7 +64,6 @@ ENV dir_clean="\ ARG APT_PKGS="\ gh \ git \ - vim \ tar \ pen \ btop \ @@ -88,13 +87,19 @@ ARG APT_PKGS="\ build-essential \ ca-certificates \ libarchive-tools \ + python3-neovim \ + ruby-neovim \ + lua-nvim \ + neovim \ " # Apt Packages RUN echo \ - && export TEST="gh version" \ + && export TEST="vim --version" \ && ${apt_update} \ && bash -c "${apt_install} --no-install-recommends -o Dpkg::Options::='--force-confold' ${APT_PKGS}" \ + && update-alternatives --set vim /usr/bin/nvim \ + && apt-get remove -y --purge nano \ && bash -c "${apt_clean}" \ && ${dir_clean} \ && ${TEST} \ diff --git a/docker/slim/rootfs/etc/skel/.bashrc b/docker/slim/rootfs/etc/skel/.bashrc index 269109a..74d61e9 100644 --- a/docker/slim/rootfs/etc/skel/.bashrc +++ b/docker/slim/rootfs/etc/skel/.bashrc @@ -43,6 +43,7 @@ eval "$(direnv hook bash)" eval "$(starship init bash)" # User Alias(s) +alias vim="nvim" alias quit="tmux detach" alias ll="ls -lah" alias rm='rm -i' From 884f38a3bc7cd2cdb34a851ca741218fca4fd4c9 Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Thu, 3 Oct 2024 11:38:07 -0700 Subject: [PATCH 2/6] adding prereq dirs for cleaner automation --- docker/slim/rootfs/etc/skel/.aws/.gitkeep | 0 docker/slim/rootfs/etc/skel/.kube/.gitkeep | 0 docker/slim/rootfs/etc/skel/.pulumi/.gitkeep | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 docker/slim/rootfs/etc/skel/.aws/.gitkeep create mode 100644 docker/slim/rootfs/etc/skel/.kube/.gitkeep create mode 100644 docker/slim/rootfs/etc/skel/.pulumi/.gitkeep diff --git a/docker/slim/rootfs/etc/skel/.aws/.gitkeep b/docker/slim/rootfs/etc/skel/.aws/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker/slim/rootfs/etc/skel/.kube/.gitkeep b/docker/slim/rootfs/etc/skel/.kube/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker/slim/rootfs/etc/skel/.pulumi/.gitkeep b/docker/slim/rootfs/etc/skel/.pulumi/.gitkeep new file mode 100644 index 0000000..e69de29 From 6763d85632245f2180e294b2dc871e78ece4aabf Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Thu, 3 Oct 2024 11:38:34 -0700 Subject: [PATCH 3/6] rm gitconfig template, lazy load w/ user specific dotfiles --- docker/slim/rootfs/etc/skel/.gitconfig | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 docker/slim/rootfs/etc/skel/.gitconfig diff --git a/docker/slim/rootfs/etc/skel/.gitconfig b/docker/slim/rootfs/etc/skel/.gitconfig deleted file mode 100644 index faa6105..0000000 --- a/docker/slim/rootfs/etc/skel/.gitconfig +++ /dev/null @@ -1,6 +0,0 @@ -[pull] - rebase = false -[alias] - count = "ls-files --exclude-standard -- ':!:**/*.[pjs][npv]g' ':!:**/*.ai' ':!:.idea' ':!:**/*.eslintrc' ':!:package-lock.json' ':!:LICENSE'" -[core] - excludesfile = /home/k/.gitignore From 26ae1a0538b324b830781a9a18b0f7326d4f158d Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Thu, 3 Oct 2024 13:37:03 -0700 Subject: [PATCH 4/6] add kubectx kubens bashly neovim --- .github/workflows/build.yaml | 13 ++ docker/base/Dockerfile | 54 +++++- docker/extra/Dockerfile | 2 +- docker/neovim/Dockerfile | 171 ++++++++++++++++++ docker/slim/Dockerfile | 9 +- docker/slim/rootfs/etc/skel/.bashrc | 1 + .../rootfs/etc/skel/.config/starship.toml | 11 ++ docker/slim/rootfs/etc/skel/.tmux.conf | 2 +- 8 files changed, 252 insertions(+), 11 deletions(-) create mode 100644 docker/neovim/Dockerfile diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 39844ac..3762093 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -191,6 +191,19 @@ jobs: platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:dind,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:dind,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" + - name: Build and Push Image devcontainer:nvim + uses: docker/build-push-action@v5 + if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' + with: + push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + #cache-from: | + # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max + context: docker/neovim + file: docker/neovim/Dockerfile + platforms: linux/amd64,linux/arm64 + tags: "docker.io/containercraft/konductor:nvim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:nvim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" + - name: Build and Push Image devcontainer:extra uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index e0bf926..406e82d 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -14,11 +14,11 @@ ENV DEVCONTAINER="base" # Install Kubectl # - https://kubernetes.io -# - github.com/kubernetes/kubernetes +#:sparkles: - github.com/kubernetes/kubernetes # && export URL="https://storage.googleapis.com/kubernetes-release/release/${VERSION}/bin/linux/${ARCH}/${PKG}" \ RUN echo \ && export NAME=kubectl \ - && export TEST="${NAME} version --client" \ + && export TEST="${NAM} version --client" \ && export REPOSITORY="kubernetes/kubernetes" \ && export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ @@ -132,3 +132,53 @@ RUN echo \ && ${dir_clean} \ && ${TEST} \ && echo + +################################################################################## +# Install kubectx CLI +# - https://github.com/ahmetb/kubectx +RUN echo \ + && export NAME=kubectx \ + && export TEST="${NAME} --version" \ + && export REPOSITORY="ahmetb/kubectx" \ + && export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ + && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ + && export PKG="${NAME}_${VERSION}_linux_${ARCH}.tar.gz" \ + && export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ + && echo "---------------------------------------------------------"\ + && echo "INFO[${NAME}] Installed:" \ + && echo "INFO[${NAME}] Command: ${NAME}" \ + && echo "INFO[${NAME}] Package: ${PKG}" \ + && echo "INFO[${NAME}] Latest Release: ${VERSION}" \ + && echo "INFO[${NAME}] Architecture: ${ARCH}" \ + && echo "INFO[${NAME}] Source: ${URL}" \ + && echo "---------------------------------------------------------"\ + && ${curl} -L ${URL} | sudo tar xzvf - --directory /tmp ${NAME} \ + && sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ + && ${dir_clean} \ + && ${TEST} \ + && echo + +################################################################################## +# Install kubens CLI +# - https://github.com/ahmetb/kubectx +RUN echo \ + && export NAME=kubens \ + && export TEST="${NAME} --version" \ + && export REPOSITORY="ahmetb/kubectx" \ + && export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ + && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ + && export PKG="${NAME}_${VERSION}_linux_${ARCH}.tar.gz" \ + && export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ + && echo "---------------------------------------------------------"\ + && echo "INFO[${NAME}] Installed:" \ + && echo "INFO[${NAME}] Command: ${NAME}" \ + && echo "INFO[${NAME}] Package: ${PKG}" \ + && echo "INFO[${NAME}] Latest Release: ${VERSION}" \ + && echo "INFO[${NAME}] Architecture: ${ARCH}" \ + && echo "INFO[${NAME}] Source: ${URL}" \ + && echo "---------------------------------------------------------"\ + && ${curl} -L ${URL} | sudo tar xzvf - --directory /tmp ${NAME} \ + && sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ + && ${dir_clean} \ + && ${TEST} \ + && echo diff --git a/docker/extra/Dockerfile b/docker/extra/Dockerfile index 1c87fac..4b54e41 100644 --- a/docker/extra/Dockerfile +++ b/docker/extra/Dockerfile @@ -3,7 +3,7 @@ # - docker build --progress plain --tag ghcr.io/containercraft/devcontainer:extra -f docker/extra/Dockerfile ./docker # - docker run --rm -d --name devcontainer --hostname devcontainer --entrypoint bash ghcr.io/containercraft/devcontainer:extra ############################################################################### -FROM ghcr.io/containercraft/devcontainer:dind +FROM ghcr.io/containercraft/devcontainer:nvim LABEL tag="extra" ENV DEVCONTAINER="extra" diff --git a/docker/neovim/Dockerfile b/docker/neovim/Dockerfile new file mode 100644 index 0000000..5507fe4 --- /dev/null +++ b/docker/neovim/Dockerfile @@ -0,0 +1,171 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag docker.io/testing/devcontainer:nvim -f Dockerfile . +# - docker run --rm -d --name devcontainer --hostname devcontainer docker.io/testing/devcontainer:nvim +############################################################################### +# Base Devcontainer Image +FROM ghcr.io/containercraft/devcontainer:dind +LABEL tag="neovim" +ENV DEVCONTAINER="neovim" + +################################################################################# +# Base package and user configuration +################################################################################# +USER root + +# Apt Packages +ARG APT_PKGS="\ + tar \ + gcc \ + curl \ + locales \ + ripgrep \ + fd-find \ + xclip \ + perl \ + ruby \ + ruby-dev \ + libyaml-dev \ + python3 \ + python3-pip \ + luarocks \ + libmsgpack-dev \ + " + +# Install Base Packages +RUN echo \ + && export TEST="echo" \ + && ${apt_update} \ + && bash -c "${apt_install} software-properties-common ca-certificates" \ + && bash -c "${apt_install} ${APT_PKGS}" \ + && ln -s $(which fdfind) /usr/local/bin/fd \ + && sudo apt-get remove -y --purge nano \ + && curl -L https://cpanmin.us | perl - --notest App::cpanminus \ + && bash -c "${apt_clean}" \ + && ${dir_clean} \ + && ${TEST} \ + && echo + +# Install lazygit +RUN echo \ + && export NAME="lazygit" \ + && export TEST="${NAME} --version" \ + && export REPOSITORY="jesseduffield/lazygit" \ + && export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ + && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ + && export PKG="${NAME}_${VERSION#v}_Linux_${ARCH}.tar.gz" \ + && export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ + && echo "---------------------------------------------------------"\ + && echo "INFO[${NAME}] Installed:" \ + && echo "INFO[${NAME}] Command: ${NAME}" \ + && echo "INFO[${NAME}] Package: ${PKG}" \ + && echo "INFO[${NAME}] Latest Release: ${VERSION}" \ + && echo "INFO[${NAME}] Architecture: ${ARCH}" \ + && echo "INFO[${NAME}] Source: ${URL}" \ + && echo "---------------------------------------------------------"\ + && ${curl} ${URL} | tar xzvf - --directory /tmp \ + && chmod 755 /tmp/${NAME} \ + && chown root:root /tmp/${NAME} \ + && mv /tmp/${NAME} /usr/local/bin/ \ + && ${dir_clean} \ + && ${TEST} \ + && echo + +# Generate and Set Locale +RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \ + && locale-gen \ + && update-locale LANG=en_US.UTF-8 + +# Install Python Packages +RUN pip3 install --no-cache-dir pynvim + +# Install Perl Neovim Extension +RUN cpanm --notest Neovim::Ext + +# Install Ruby Neovim Gem +RUN gem install neovim bashly + +################################################################################# +# Install Programming Language Tooling +# - nodejs +# - npm +# - yarn +RUN echo \ + && sudo apt-get remove -y nodejs npm libnode-dev || true \ + && mkdir -p /etc/apt/keyrings \ + && curl -L https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ + | sudo gpg --yes --batch --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && export NODE_MAJOR=20 \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \ + | sudo tee -a /etc/apt/sources.list.d/nodesource.list \ + && apt-get update \ + && apt-get install -y nodejs \ + && apt-get clean \ + && apt-get autoremove -y \ + && apt-get purge -y --auto-remove \ + && ${dir_clean} \ + && node --version \ + && npm --version \ + && npm install --global yarn \ + && yarn --version \ + && true + +################################################################################# +# Build and Install Neovim from Source +################################################################################# + +# Build Packages +ARG BUILD_PKGS="\ +make \ +wget \ +build-essential \ +ninja-build \ +gettext \ +libtool \ +libtool-bin \ +autoconf \ +automake \ +cmake \ +pkg-config \ +unzip \ +doxygen \ +" + +# Optional: replace vim with nvim +# && apt-get purge -y --auto-remove $(echo "${BUILD_PKGS}" | tr -d '\n' | sed 's/ */ /g') \ +RUN echo \ + && export NAME="neovim" \ + && export TEST="nvim --version" \ + && export REPOSITORY="neovim/neovim" \ + && export VERSION="$(${curl_github} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ + && echo "---------------------------------------------------------" \ + && echo "INFO[${NAME}] Building Neovim Version: ${VERSION}" \ + && echo "---------------------------------------------------------" \ + && ${apt_update} \ + && bash -c "${apt_install} ${BUILD_PKGS}" \ + && git clone --depth 1 --branch ${VERSION} https://github.com/${REPOSITORY}.git /tmp/neovim \ + && cd /tmp/neovim \ + && make CMAKE_BUILD_TYPE=Release \ + && make install \ + && rm -rf /tmp/neovim \ + && update-alternatives --install /usr/bin/vim vim /usr/local/bin/nvim 100 \ + && update-alternatives --set vim /usr/local/bin/nvim \ + && bash -c "${apt_clean}" \ + && ${dir_clean} \ + && ${TEST} \ + && echo + +USER vscode +RUN set -ex \ + && git clone https://github.com/LazyVim/starter ~/.config/nvim \ + && nvim --headless "+Lazy! sync" +qa \ + && nvim --headless "+Lazy! sync" +qa \ + && true + +# Install Node.js Neovim Package and tree-sitter-cli +RUN sudo npm install -g neovim tree-sitter-cli + +################################################################################# +# Set the default command +################################################################################# +CMD ["bash"] diff --git a/docker/slim/Dockerfile b/docker/slim/Dockerfile index 8ede57b..e443ae7 100644 --- a/docker/slim/Dockerfile +++ b/docker/slim/Dockerfile @@ -38,6 +38,8 @@ ENV INSTALL="install -m 755 -o root -g root" # Set additional environment variables ENV REGISTRY_AUTH_FILE='/home/vscode/.docker/config.json' ENV XDG_CONFIG_HOME=/home/vscode/.config +# Set Starship Container Name +ENV STARSHIP_CONTAINER="Konductor" # Common Dockerfile Container Build Functions ENV apt_update="sudo apt-get update" @@ -292,13 +294,6 @@ RUN echo \ && ${TEST} \ && echo -# Vim Plugins -RUN echo \ - && /bin/bash -c "vim -T dumb -n -i NONE -es -S <(echo -e 'silent! PluginInstall')" \ - && git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim \ - && vim -E -u NONE -S ~/.vimrc +PluginInstall +qall \ - && echo - # TMUX Plugins RUN echo \ && ~/.tmux/plugins/tpm/bin/install_plugins || true \ diff --git a/docker/slim/rootfs/etc/skel/.bashrc b/docker/slim/rootfs/etc/skel/.bashrc index 74d61e9..78e296c 100644 --- a/docker/slim/rootfs/etc/skel/.bashrc +++ b/docker/slim/rootfs/etc/skel/.bashrc @@ -43,6 +43,7 @@ eval "$(direnv hook bash)" eval "$(starship init bash)" # User Alias(s) +alias k=kubecolor alias vim="nvim" alias quit="tmux detach" alias ll="ls -lah" diff --git a/docker/slim/rootfs/etc/skel/.config/starship.toml b/docker/slim/rootfs/etc/skel/.config/starship.toml index 631c8fd..f774bce 100644 --- a/docker/slim/rootfs/etc/skel/.config/starship.toml +++ b/docker/slim/rootfs/etc/skel/.config/starship.toml @@ -22,6 +22,17 @@ error_symbol = "[x](bold red)" # Symbol displayed when in Vim command mode vimcmd_symbol = "[<](bold green)" +# --------------------------- +# Container Module +# --------------------------- +[container] +# Remove the default symbol (⬢) by setting it to an empty string +symbol = "" +# Set the style to the desired hex color +style = "fg:#77c1c8" +# Define the format to display only the container name in brackets +format = "[$name]($style) " + # --------------------------- # Git Configuration # --------------------------- diff --git a/docker/slim/rootfs/etc/skel/.tmux.conf b/docker/slim/rootfs/etc/skel/.tmux.conf index 32fa572..0ef815b 100644 --- a/docker/slim/rootfs/etc/skel/.tmux.conf +++ b/docker/slim/rootfs/etc/skel/.tmux.conf @@ -1,4 +1,4 @@ -set-option -g default-shell /usr/bin/fish +set-option -g default-shell /usr/bin/bash set -g default-terminal screen-256color # List of plugins set -g @plugin 'tmux-plugins/tpm' From e8c56b13b857889d954add01eac7b9db24e81cca Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Thu, 3 Oct 2024 14:10:02 -0700 Subject: [PATCH 5/6] fix missing char --- docker/base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index 406e82d..6f3393a 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -18,7 +18,7 @@ ENV DEVCONTAINER="base" # && export URL="https://storage.googleapis.com/kubernetes-release/release/${VERSION}/bin/linux/${ARCH}/${PKG}" \ RUN echo \ && export NAME=kubectl \ - && export TEST="${NAM} version --client" \ + && export TEST="${NAME} version --client" \ && export REPOSITORY="kubernetes/kubernetes" \ && export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ From 21a7841d47f0bf575cd6e180f39ce4e7fbde3dbe Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Thu, 3 Oct 2024 15:15:34 -0700 Subject: [PATCH 6/6] activate cache --- .github/workflows/build.yaml | 92 +++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3762093..d424af6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,17 +36,20 @@ jobs: steps: - name: Git Checkout uses: actions/checkout@v4 - id: git-checkout + id: dep-git-checkout - name: Set up QEMU + id: dep-qemu uses: docker/setup-qemu-action@v3 id: qemu-install - name: Install Docker Buildx + id: dep-buildx uses: docker/setup-buildx-action@v3 id: docker-buildx-install - name: Login to GitHub Container Registry + id: login-ghcr uses: docker/login-action@v3 id: docker-login-ghcr with: @@ -55,6 +58,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Docker Hub Container Registry + id: login-dockerhub uses: docker/login-action@v3 id: docker-login-dockerhub with: @@ -63,168 +67,182 @@ jobs: password: ${{ secrets.DOCKERHUB_PASSWD }} - name: repository_owner to lower case + id: namespace-to-lower uses: Entepotenz/change-string-case-action-min-dependencies@v1 id: string-owner-to-lower with: string: ${{ github.repository_owner }} - name: Transform repository name to lower case + id: repo-to-lower uses: Entepotenz/change-string-case-action-min-dependencies@v1 id: string-repository-to-lower with: string: ${{ github.repository }} - name: Build and Push Image devcontainer:slim + id: slim uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max context: docker file: docker/slim/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:slim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:slim-node + id: slim-node uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache context: docker/slim-node file: docker/slim-node/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:slim-node,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-node,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:slim-python + id: slim-python uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache context: docker/slim-python file: docker/slim-python/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:slim-python,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-python,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:slim-golang + id: slim-golang uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache context: docker/slim-golang file: docker/slim-golang/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:slim-go,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-go,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:slim-dotnet + id: slim-dotnet uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache context: docker/slim-dotnet file: docker/slim-dotnet/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:slim-dotnet,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-dotnet,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:slim-all + id: slim-all uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max context: docker/slim-all file: docker/slim-all/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:slim-all,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim-all,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:hugo + id: slim uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max context: docker/hugo file: docker/hugo/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:hugo,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:hugo,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:base + id: base uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max context: docker/base file: docker/base/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:base,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:base,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:dind + id: docker-in-docker uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max context: docker/docker-in-docker file: docker/docker-in-docker/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:dind,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:dind,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:nvim + id: nvim uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max context: docker/neovim file: docker/neovim/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:nvim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:nvim,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:extra + id: extra uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max context: docker/extra file: docker/extra/Dockerfile platforms: linux/amd64,linux/arm64 tags: "docker.io/containercraft/konductor:latest,docker.io/containercraft/konductor:extra,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:extra,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:latest,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" - name: Build and Push Image devcontainer:code-server + id: code-server uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' with: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - #cache-from: | - # type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:server-cache - #cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:server-cache + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:cache,mode=max context: docker/code-server file: docker/code-server/Dockerfile platforms: linux/amd64,linux/arm64