Skip to content

Commit

Permalink
disable cache for dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat authored Aug 25, 2024
1 parent ffbed9f commit d6a348e
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 92 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ jobs:
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
Expand All @@ -84,9 +84,9 @@ jobs:
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
Expand All @@ -97,9 +97,9 @@ jobs:
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
Expand All @@ -110,9 +110,9 @@ jobs:
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
Expand All @@ -123,9 +123,9 @@ jobs:
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
Expand All @@ -136,9 +136,9 @@ jobs:
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
Expand All @@ -149,9 +149,9 @@ jobs:
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
Expand All @@ -162,9 +162,9 @@ jobs:
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
Expand All @@ -175,9 +175,9 @@ jobs:
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
Expand All @@ -188,9 +188,9 @@ jobs:
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
Expand All @@ -201,9 +201,9 @@ jobs:
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
Expand Down
118 changes: 59 additions & 59 deletions docker/code-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,72 +10,72 @@ ENV TAG="code-server"
# Install VSCode Service
EXPOSE 8080
RUN set -ex \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "aarch64") print "arm64"; else print "unknown" }') \
&& export varVerCode=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | awk -F '["v,]' '/tag_name/{print $5}') \
&& curl --output /tmp/code-server.deb -L "https://github.com/coder/code-server/releases/download/v${varVerCode}/code-server_${varVerCode}_${arch}.deb" \
&& sudo apt-get update \
&& sudo apt-get install -y /tmp/code-server.deb \
&& sudo apt-get clean \
&& sudo apt-get autoremove -y \
&& sudo apt-get purge -y --auto-remove \
&& sudo rm -rf \
/var/lib/{apt,dpkg,cache,log} \
/usr/share/{doc,man,locale} \
/var/cache/apt \
/root/.cache \
/var/tmp/* \
/tmp/* \
&& true
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "aarch64") print "arm64"; else print "unknown" }') \
&& export varVerCode=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | awk -F '["v,]' '/tag_name/{print $5}') \
&& curl --output /tmp/code-server.deb -L "https://github.com/coder/code-server/releases/download/v${varVerCode}/code-server_${varVerCode}_${arch}.deb" \
&& sudo apt-get update \
&& sudo apt-get install -y /tmp/code-server.deb \
&& sudo apt-get clean \
&& sudo apt-get autoremove -y \
&& sudo apt-get purge -y --auto-remove \
&& sudo rm -rf \
/var/lib/{apt,dpkg,cache,log} \
/usr/share/{doc,man,locale} \
/var/cache/apt \
/root/.cache \
/var/tmp/* \
/tmp/* \
&& true

# Install VSCode Extension Plugins
ARG CODE_PKGS="\
golang.go \
vscodevim.vim \
stateful.runme \
github.copilot \
max-ss.cyberpunk \
ms-python.python \
redhat.vscode-yaml \
esbenp.prettier-vscode \
oderwat.indent-rainbow \
okteto.kubernetes-context \
ms-vsliveshare.vsliveshare \
ms-azuretools.vscode-docker \
github.vscode-github-actions \
ms-kubernetes-tools.kind-vscode \
ms-vscode.vscode-typescript-next \
github.vscode-pull-request-github \
ms-vscode-remote.remote-containers \
randomfractalsinc.vscode-data-table \
visualstudioexptteam.vscodeintellicode \
ms-kubernetes-tools.vscode-kubernetes-tools \
"
golang.go \
vscodevim.vim \
stateful.runme \
github.copilot \
max-ss.cyberpunk \
ms-python.python \
redhat.vscode-yaml \
esbenp.prettier-vscode \
oderwat.indent-rainbow \
okteto.kubernetes-context \
ms-vsliveshare.vsliveshare \
ms-azuretools.vscode-docker \
github.vscode-github-actions \
ms-kubernetes-tools.kind-vscode \
ms-vscode.vscode-typescript-next \
github.vscode-pull-request-github \
ms-vscode-remote.remote-containers \
randomfractalsinc.vscode-data-table \
visualstudioexptteam.vscodeintellicode \
ms-kubernetes-tools.vscode-kubernetes-tools \
"

RUN set -ex \
&& for pkg in ${CODE_PKGS}; do code-server --install-extension ${pkg}; echo "Installed: ${pkg}"; done \
&& true
&& for pkg in ${CODE_PKGS}; do code-server --install-extension ${pkg}; echo "Installed: ${pkg}"; done \
&& true

# Install ttyd
# - https://tsl0922.github.io/ttyd
# - https://github.com/tsl0922/ttyd
RUN echo \
&& export NAME=ttyd \
&& export TEST="${NAME} --version" \
&& export REPOSITORY="tsl0922/ttyd" \
&& 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 "aarch64"; else print "unknown" }') \
&& export PKG="${NAME}.${ARCH}" \
&& 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} --output /tmp/${NAME} \
&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \
&& ${dir_clean} \
&& ${TEST} \
&& echo
&& export NAME=ttyd \
&& export TEST="${NAME} --version" \
&& export REPOSITORY="tsl0922/ttyd" \
&& 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 "aarch64"; else print "unknown" }') \
&& export PKG="${NAME}.${ARCH}" \
&& 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} --output /tmp/${NAME} \
&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \
&& ${dir_clean} \
&& ${TEST} \
&& echo

0 comments on commit d6a348e

Please sign in to comment.