diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 4f500b27..6e9323ab 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -214,7 +214,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-18-0-docker-go-1-20-10 + id: prep-4-18-0-docker-go-1-20-11 run: | set -e @@ -227,7 +227,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.18.0-docker-go-1.20.10" + VARIANT="4.18.0-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -237,45 +237,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.18.0-docker-go-1.20.10 - Build (PRs) + - name: 4.18.0-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.18.0-docker-go-1.20.10 + context: variants/4.18.0-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.18.0-docker-go-1.20.10 - Build and push (master) + - name: 4.18.0-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.18.0-docker-go-1.20.10 + context: variants/4.18.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.18.0-docker-go-1.20.10 - Build and push (release) + - name: 4.18.0-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.18.0-docker-go-1.20.10 + context: variants/4.18.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -348,7 +348,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-18-0-docker-rootless-go-1-20-10 + id: prep-4-18-0-docker-rootless-go-1-20-11 run: | set -e @@ -361,7 +361,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.18.0-docker-rootless-go-1.20.10" + VARIANT="4.18.0-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -371,45 +371,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.18.0-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.18.0-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.18.0-docker-rootless-go-1.20.10 + context: variants/4.18.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.18.0-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.18.0-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.18.0-docker-rootless-go-1.20.10 + context: variants/4.18.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.18.0-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.18.0-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.18.0-docker-rootless-go-1.20.10 + context: variants/4.18.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -601,7 +601,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-17-1-docker-go-1-20-10 + id: prep-4-17-1-docker-go-1-20-11 run: | set -e @@ -614,7 +614,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.17.1-docker-go-1.20.10" + VARIANT="4.17.1-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -624,45 +624,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.17.1-docker-go-1.20.10 - Build (PRs) + - name: 4.17.1-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.17.1-docker-go-1.20.10 + context: variants/4.17.1-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.17.1-docker-go-1.20.10 - Build and push (master) + - name: 4.17.1-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.17.1-docker-go-1.20.10 + context: variants/4.17.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.17.1-docker-go-1.20.10 - Build and push (release) + - name: 4.17.1-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.17.1-docker-go-1.20.10 + context: variants/4.17.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -735,7 +735,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-17-1-docker-rootless-go-1-20-10 + id: prep-4-17-1-docker-rootless-go-1-20-11 run: | set -e @@ -748,7 +748,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.17.1-docker-rootless-go-1.20.10" + VARIANT="4.17.1-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -758,45 +758,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.17.1-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.17.1-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.17.1-docker-rootless-go-1.20.10 + context: variants/4.17.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.17.1-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.17.1-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.17.1-docker-rootless-go-1.20.10 + context: variants/4.17.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.17.1-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.17.1-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.17.1-docker-rootless-go-1.20.10 + context: variants/4.17.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -988,7 +988,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-16-1-docker-go-1-20-10 + id: prep-4-16-1-docker-go-1-20-11 run: | set -e @@ -1001,7 +1001,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.16.1-docker-go-1.20.10" + VARIANT="4.16.1-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -1011,45 +1011,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.16.1-docker-go-1.20.10 - Build (PRs) + - name: 4.16.1-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.16.1-docker-go-1.20.10 + context: variants/4.16.1-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.16.1-docker-go-1.20.10 - Build and push (master) + - name: 4.16.1-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.16.1-docker-go-1.20.10 + context: variants/4.16.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.16.1-docker-go-1.20.10 - Build and push (release) + - name: 4.16.1-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.16.1-docker-go-1.20.10 + context: variants/4.16.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1122,7 +1122,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-16-1-docker-rootless-go-1-20-10 + id: prep-4-16-1-docker-rootless-go-1-20-11 run: | set -e @@ -1135,7 +1135,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.16.1-docker-rootless-go-1.20.10" + VARIANT="4.16.1-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -1145,45 +1145,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.16.1-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.16.1-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.16.1-docker-rootless-go-1.20.10 + context: variants/4.16.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.16.1-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.16.1-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.16.1-docker-rootless-go-1.20.10 + context: variants/4.16.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.16.1-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.16.1-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.16.1-docker-rootless-go-1.20.10 + context: variants/4.16.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1375,7 +1375,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-15-0-docker-go-1-20-10 + id: prep-4-15-0-docker-go-1-20-11 run: | set -e @@ -1388,7 +1388,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.15.0-docker-go-1.20.10" + VARIANT="4.15.0-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -1398,45 +1398,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.15.0-docker-go-1.20.10 - Build (PRs) + - name: 4.15.0-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.15.0-docker-go-1.20.10 + context: variants/4.15.0-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.15.0-docker-go-1.20.10 - Build and push (master) + - name: 4.15.0-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.15.0-docker-go-1.20.10 + context: variants/4.15.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.15.0-docker-go-1.20.10 - Build and push (release) + - name: 4.15.0-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.15.0-docker-go-1.20.10 + context: variants/4.15.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1509,7 +1509,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-15-0-docker-rootless-go-1-20-10 + id: prep-4-15-0-docker-rootless-go-1-20-11 run: | set -e @@ -1522,7 +1522,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.15.0-docker-rootless-go-1.20.10" + VARIANT="4.15.0-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -1532,45 +1532,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.15.0-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.15.0-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.15.0-docker-rootless-go-1.20.10 + context: variants/4.15.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.15.0-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.15.0-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.15.0-docker-rootless-go-1.20.10 + context: variants/4.15.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.15.0-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.15.0-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.15.0-docker-rootless-go-1.20.10 + context: variants/4.15.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1762,7 +1762,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-14-1-docker-go-1-20-10 + id: prep-4-14-1-docker-go-1-20-11 run: | set -e @@ -1775,7 +1775,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.14.1-docker-go-1.20.10" + VARIANT="4.14.1-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -1785,45 +1785,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.14.1-docker-go-1.20.10 - Build (PRs) + - name: 4.14.1-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.14.1-docker-go-1.20.10 + context: variants/4.14.1-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.14.1-docker-go-1.20.10 - Build and push (master) + - name: 4.14.1-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.14.1-docker-go-1.20.10 + context: variants/4.14.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.14.1-docker-go-1.20.10 - Build and push (release) + - name: 4.14.1-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.14.1-docker-go-1.20.10 + context: variants/4.14.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1896,7 +1896,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-14-1-docker-rootless-go-1-20-10 + id: prep-4-14-1-docker-rootless-go-1-20-11 run: | set -e @@ -1909,7 +1909,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.14.1-docker-rootless-go-1.20.10" + VARIANT="4.14.1-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -1919,45 +1919,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.14.1-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.14.1-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.14.1-docker-rootless-go-1.20.10 + context: variants/4.14.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.14.1-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.14.1-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.14.1-docker-rootless-go-1.20.10 + context: variants/4.14.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.14.1-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.14.1-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.14.1-docker-rootless-go-1.20.10 + context: variants/4.14.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2149,7 +2149,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-13-0-docker-go-1-20-10 + id: prep-4-13-0-docker-go-1-20-11 run: | set -e @@ -2162,7 +2162,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.13.0-docker-go-1.20.10" + VARIANT="4.13.0-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -2172,45 +2172,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.13.0-docker-go-1.20.10 - Build (PRs) + - name: 4.13.0-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.13.0-docker-go-1.20.10 + context: variants/4.13.0-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.13.0-docker-go-1.20.10 - Build and push (master) + - name: 4.13.0-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.13.0-docker-go-1.20.10 + context: variants/4.13.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.13.0-docker-go-1.20.10 - Build and push (release) + - name: 4.13.0-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.13.0-docker-go-1.20.10 + context: variants/4.13.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2283,7 +2283,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-13-0-docker-rootless-go-1-20-10 + id: prep-4-13-0-docker-rootless-go-1-20-11 run: | set -e @@ -2296,7 +2296,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.13.0-docker-rootless-go-1.20.10" + VARIANT="4.13.0-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -2306,45 +2306,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.13.0-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.13.0-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.13.0-docker-rootless-go-1.20.10 + context: variants/4.13.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.13.0-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.13.0-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.13.0-docker-rootless-go-1.20.10 + context: variants/4.13.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.13.0-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.13.0-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.13.0-docker-rootless-go-1.20.10 + context: variants/4.13.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2536,7 +2536,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-12-0-docker-go-1-20-10 + id: prep-4-12-0-docker-go-1-20-11 run: | set -e @@ -2549,7 +2549,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.12.0-docker-go-1.20.10" + VARIANT="4.12.0-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -2559,45 +2559,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.12.0-docker-go-1.20.10 - Build (PRs) + - name: 4.12.0-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.12.0-docker-go-1.20.10 + context: variants/4.12.0-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.12.0-docker-go-1.20.10 - Build and push (master) + - name: 4.12.0-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.12.0-docker-go-1.20.10 + context: variants/4.12.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.12.0-docker-go-1.20.10 - Build and push (release) + - name: 4.12.0-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.12.0-docker-go-1.20.10 + context: variants/4.12.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2670,7 +2670,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-12-0-docker-rootless-go-1-20-10 + id: prep-4-12-0-docker-rootless-go-1-20-11 run: | set -e @@ -2683,7 +2683,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.12.0-docker-rootless-go-1.20.10" + VARIANT="4.12.0-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -2693,45 +2693,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.12.0-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.12.0-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.12.0-docker-rootless-go-1.20.10 + context: variants/4.12.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.12.0-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.12.0-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.12.0-docker-rootless-go-1.20.10 + context: variants/4.12.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.12.0-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.12.0-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.12.0-docker-rootless-go-1.20.10 + context: variants/4.12.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2923,7 +2923,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-11-0-docker-go-1-20-10 + id: prep-4-11-0-docker-go-1-20-11 run: | set -e @@ -2936,7 +2936,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.11.0-docker-go-1.20.10" + VARIANT="4.11.0-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -2946,45 +2946,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.11.0-docker-go-1.20.10 - Build (PRs) + - name: 4.11.0-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.11.0-docker-go-1.20.10 + context: variants/4.11.0-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.11.0-docker-go-1.20.10 - Build and push (master) + - name: 4.11.0-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.11.0-docker-go-1.20.10 + context: variants/4.11.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.11.0-docker-go-1.20.10 - Build and push (release) + - name: 4.11.0-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.11.0-docker-go-1.20.10 + context: variants/4.11.0-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -3057,7 +3057,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-11-0-docker-rootless-go-1-20-10 + id: prep-4-11-0-docker-rootless-go-1-20-11 run: | set -e @@ -3070,7 +3070,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.11.0-docker-rootless-go-1.20.10" + VARIANT="4.11.0-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -3080,45 +3080,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.11.0-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.11.0-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.11.0-docker-rootless-go-1.20.10 + context: variants/4.11.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.11.0-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.11.0-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.11.0-docker-rootless-go-1.20.10 + context: variants/4.11.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.11.0-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.11.0-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.11.0-docker-rootless-go-1.20.10 + context: variants/4.11.0-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -3310,7 +3310,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-10-1-docker-go-1-20-10 + id: prep-4-10-1-docker-go-1-20-11 run: | set -e @@ -3323,7 +3323,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.10.1-docker-go-1.20.10" + VARIANT="4.10.1-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -3333,45 +3333,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.10.1-docker-go-1.20.10 - Build (PRs) + - name: 4.10.1-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.10.1-docker-go-1.20.10 + context: variants/4.10.1-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.10.1-docker-go-1.20.10 - Build and push (master) + - name: 4.10.1-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.10.1-docker-go-1.20.10 + context: variants/4.10.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.10.1-docker-go-1.20.10 - Build and push (release) + - name: 4.10.1-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.10.1-docker-go-1.20.10 + context: variants/4.10.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -3444,7 +3444,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-10-1-docker-rootless-go-1-20-10 + id: prep-4-10-1-docker-rootless-go-1-20-11 run: | set -e @@ -3457,7 +3457,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.10.1-docker-rootless-go-1.20.10" + VARIANT="4.10.1-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -3467,45 +3467,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.10.1-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.10.1-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.10.1-docker-rootless-go-1.20.10 + context: variants/4.10.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.10.1-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.10.1-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.10.1-docker-rootless-go-1.20.10 + context: variants/4.10.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.10.1-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.10.1-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.10.1-docker-rootless-go-1.20.10 + context: variants/4.10.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-10-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -3697,7 +3697,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-9-1-docker-go-1-20-10 + id: prep-4-9-1-docker-go-1-20-11 run: | set -e @@ -3710,7 +3710,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.9.1-docker-go-1.20.10" + VARIANT="4.9.1-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -3720,45 +3720,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.9.1-docker-go-1.20.10 - Build (PRs) + - name: 4.9.1-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.9.1-docker-go-1.20.10 + context: variants/4.9.1-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.9.1-docker-go-1.20.10 - Build and push (master) + - name: 4.9.1-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.9.1-docker-go-1.20.10 + context: variants/4.9.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.9.1-docker-go-1.20.10 - Build and push (release) + - name: 4.9.1-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.9.1-docker-go-1.20.10 + context: variants/4.9.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -3831,7 +3831,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-9-1-docker-rootless-go-1-20-10 + id: prep-4-9-1-docker-rootless-go-1-20-11 run: | set -e @@ -3844,7 +3844,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.9.1-docker-rootless-go-1.20.10" + VARIANT="4.9.1-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -3854,45 +3854,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.9.1-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.9.1-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.9.1-docker-rootless-go-1.20.10 + context: variants/4.9.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.9.1-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.9.1-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.9.1-docker-rootless-go-1.20.10 + context: variants/4.9.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.9.1-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.9.1-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.9.1-docker-rootless-go-1.20.10 + context: variants/4.9.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-9-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -4084,7 +4084,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-8-3-docker-go-1-20-10 + id: prep-4-8-3-docker-go-1-20-11 run: | set -e @@ -4097,7 +4097,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.8.3-docker-go-1.20.10" + VARIANT="4.8.3-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -4107,45 +4107,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.8.3-docker-go-1.20.10 - Build (PRs) + - name: 4.8.3-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.8.3-docker-go-1.20.10 + context: variants/4.8.3-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.8.3-docker-go-1.20.10 - Build and push (master) + - name: 4.8.3-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.8.3-docker-go-1.20.10 + context: variants/4.8.3-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.8.3-docker-go-1.20.10 - Build and push (release) + - name: 4.8.3-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.8.3-docker-go-1.20.10 + context: variants/4.8.3-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -4218,7 +4218,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-8-3-docker-rootless-go-1-20-10 + id: prep-4-8-3-docker-rootless-go-1-20-11 run: | set -e @@ -4231,7 +4231,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.8.3-docker-rootless-go-1.20.10" + VARIANT="4.8.3-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -4241,45 +4241,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.8.3-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.8.3-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.8.3-docker-rootless-go-1.20.10 + context: variants/4.8.3-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.8.3-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.8.3-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.8.3-docker-rootless-go-1.20.10 + context: variants/4.8.3-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.8.3-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.8.3-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.8.3-docker-rootless-go-1.20.10 + context: variants/4.8.3-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-8-3-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -4471,7 +4471,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-7-1-docker-go-1-20-10 + id: prep-4-7-1-docker-go-1-20-11 run: | set -e @@ -4484,7 +4484,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.7.1-docker-go-1.20.10" + VARIANT="4.7.1-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -4494,45 +4494,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.7.1-docker-go-1.20.10 - Build (PRs) + - name: 4.7.1-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.7.1-docker-go-1.20.10 + context: variants/4.7.1-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.7.1-docker-go-1.20.10 - Build and push (master) + - name: 4.7.1-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.7.1-docker-go-1.20.10 + context: variants/4.7.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.7.1-docker-go-1.20.10 - Build and push (release) + - name: 4.7.1-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.7.1-docker-go-1.20.10 + context: variants/4.7.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -4605,7 +4605,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-7-1-docker-rootless-go-1-20-10 + id: prep-4-7-1-docker-rootless-go-1-20-11 run: | set -e @@ -4618,7 +4618,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.7.1-docker-rootless-go-1.20.10" + VARIANT="4.7.1-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -4628,45 +4628,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.7.1-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.7.1-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.7.1-docker-rootless-go-1.20.10 + context: variants/4.7.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.7.1-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.7.1-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.7.1-docker-rootless-go-1.20.10 + context: variants/4.7.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.7.1-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.7.1-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.7.1-docker-rootless-go-1.20.10 + context: variants/4.7.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-7-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -4858,7 +4858,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-6-1-docker-go-1-20-10 + id: prep-4-6-1-docker-go-1-20-11 run: | set -e @@ -4871,7 +4871,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.6.1-docker-go-1.20.10" + VARIANT="4.6.1-docker-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -4881,45 +4881,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.6.1-docker-go-1.20.10 - Build (PRs) + - name: 4.6.1-docker-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.6.1-docker-go-1.20.10 + context: variants/4.6.1-docker-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.6.1-docker-go-1.20.10 - Build and push (master) + - name: 4.6.1-docker-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.6.1-docker-go-1.20.10 + context: variants/4.6.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.6.1-docker-go-1.20.10 - Build and push (release) + - name: 4.6.1-docker-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.6.1-docker-go-1.20.10 + context: variants/4.6.1-docker-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -4992,7 +4992,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-4-6-1-docker-rootless-go-1-20-10 + id: prep-4-6-1-docker-rootless-go-1-20-11 run: | set -e @@ -5005,7 +5005,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="4.6.1-docker-rootless-go-1.20.10" + VARIANT="4.6.1-docker-rootless-go-1.20.11" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -5015,45 +5015,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 4.6.1-docker-rootless-go-1.20.10 - Build (PRs) + - name: 4.6.1-docker-rootless-go-1.20.11 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: variants/4.6.1-docker-rootless-go-1.20.10 + context: variants/4.6.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: false tags: | - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.6.1-docker-rootless-go-1.20.10 - Build and push (master) + - name: 4.6.1-docker-rootless-go-1.20.11 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: variants/4.6.1-docker-rootless-go-1.20.10 + context: variants/4.6.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 4.6.1-docker-rootless-go-1.20.10 - Build and push (release) + - name: 4.6.1-docker-rootless-go-1.20.11 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: variants/4.6.1-docker-rootless-go-1.20.10 + context: variants/4.6.1-docker-rootless-go-1.20.11 platforms: linux/amd64 push: true tags: | - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-10.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-10.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-10.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-11.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-11.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-4-6-1-docker-rootless-go-1-20-11.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max diff --git a/README.md b/README.md index 1a8ee737..9d0c204c 100644 --- a/README.md +++ b/README.md @@ -12,69 +12,69 @@ Dockerized [`code-server`](https://github.com/coder/code-server). |:-------:|:---------:| | `:4.18.0`, `:latest` | [View](variants/4.18.0) | | `:4.18.0-docker` | [View](variants/4.18.0-docker) | -| `:4.18.0-docker-go-1.20.10` | [View](variants/4.18.0-docker-go-1.20.10) | +| `:4.18.0-docker-go-1.20.11` | [View](variants/4.18.0-docker-go-1.20.11) | | `:4.18.0-docker-rootless` | [View](variants/4.18.0-docker-rootless) | -| `:4.18.0-docker-rootless-go-1.20.10` | [View](variants/4.18.0-docker-rootless-go-1.20.10) | +| `:4.18.0-docker-rootless-go-1.20.11` | [View](variants/4.18.0-docker-rootless-go-1.20.11) | | `:4.17.1` | [View](variants/4.17.1) | | `:4.17.1-docker` | [View](variants/4.17.1-docker) | -| `:4.17.1-docker-go-1.20.10` | [View](variants/4.17.1-docker-go-1.20.10) | +| `:4.17.1-docker-go-1.20.11` | [View](variants/4.17.1-docker-go-1.20.11) | | `:4.17.1-docker-rootless` | [View](variants/4.17.1-docker-rootless) | -| `:4.17.1-docker-rootless-go-1.20.10` | [View](variants/4.17.1-docker-rootless-go-1.20.10) | +| `:4.17.1-docker-rootless-go-1.20.11` | [View](variants/4.17.1-docker-rootless-go-1.20.11) | | `:4.16.1` | [View](variants/4.16.1) | | `:4.16.1-docker` | [View](variants/4.16.1-docker) | -| `:4.16.1-docker-go-1.20.10` | [View](variants/4.16.1-docker-go-1.20.10) | +| `:4.16.1-docker-go-1.20.11` | [View](variants/4.16.1-docker-go-1.20.11) | | `:4.16.1-docker-rootless` | [View](variants/4.16.1-docker-rootless) | -| `:4.16.1-docker-rootless-go-1.20.10` | [View](variants/4.16.1-docker-rootless-go-1.20.10) | +| `:4.16.1-docker-rootless-go-1.20.11` | [View](variants/4.16.1-docker-rootless-go-1.20.11) | | `:4.15.0` | [View](variants/4.15.0) | | `:4.15.0-docker` | [View](variants/4.15.0-docker) | -| `:4.15.0-docker-go-1.20.10` | [View](variants/4.15.0-docker-go-1.20.10) | +| `:4.15.0-docker-go-1.20.11` | [View](variants/4.15.0-docker-go-1.20.11) | | `:4.15.0-docker-rootless` | [View](variants/4.15.0-docker-rootless) | -| `:4.15.0-docker-rootless-go-1.20.10` | [View](variants/4.15.0-docker-rootless-go-1.20.10) | +| `:4.15.0-docker-rootless-go-1.20.11` | [View](variants/4.15.0-docker-rootless-go-1.20.11) | | `:4.14.1` | [View](variants/4.14.1) | | `:4.14.1-docker` | [View](variants/4.14.1-docker) | -| `:4.14.1-docker-go-1.20.10` | [View](variants/4.14.1-docker-go-1.20.10) | +| `:4.14.1-docker-go-1.20.11` | [View](variants/4.14.1-docker-go-1.20.11) | | `:4.14.1-docker-rootless` | [View](variants/4.14.1-docker-rootless) | -| `:4.14.1-docker-rootless-go-1.20.10` | [View](variants/4.14.1-docker-rootless-go-1.20.10) | +| `:4.14.1-docker-rootless-go-1.20.11` | [View](variants/4.14.1-docker-rootless-go-1.20.11) | | `:4.13.0` | [View](variants/4.13.0) | | `:4.13.0-docker` | [View](variants/4.13.0-docker) | -| `:4.13.0-docker-go-1.20.10` | [View](variants/4.13.0-docker-go-1.20.10) | +| `:4.13.0-docker-go-1.20.11` | [View](variants/4.13.0-docker-go-1.20.11) | | `:4.13.0-docker-rootless` | [View](variants/4.13.0-docker-rootless) | -| `:4.13.0-docker-rootless-go-1.20.10` | [View](variants/4.13.0-docker-rootless-go-1.20.10) | +| `:4.13.0-docker-rootless-go-1.20.11` | [View](variants/4.13.0-docker-rootless-go-1.20.11) | | `:4.12.0` | [View](variants/4.12.0) | | `:4.12.0-docker` | [View](variants/4.12.0-docker) | -| `:4.12.0-docker-go-1.20.10` | [View](variants/4.12.0-docker-go-1.20.10) | +| `:4.12.0-docker-go-1.20.11` | [View](variants/4.12.0-docker-go-1.20.11) | | `:4.12.0-docker-rootless` | [View](variants/4.12.0-docker-rootless) | -| `:4.12.0-docker-rootless-go-1.20.10` | [View](variants/4.12.0-docker-rootless-go-1.20.10) | +| `:4.12.0-docker-rootless-go-1.20.11` | [View](variants/4.12.0-docker-rootless-go-1.20.11) | | `:4.11.0` | [View](variants/4.11.0) | | `:4.11.0-docker` | [View](variants/4.11.0-docker) | -| `:4.11.0-docker-go-1.20.10` | [View](variants/4.11.0-docker-go-1.20.10) | +| `:4.11.0-docker-go-1.20.11` | [View](variants/4.11.0-docker-go-1.20.11) | | `:4.11.0-docker-rootless` | [View](variants/4.11.0-docker-rootless) | -| `:4.11.0-docker-rootless-go-1.20.10` | [View](variants/4.11.0-docker-rootless-go-1.20.10) | +| `:4.11.0-docker-rootless-go-1.20.11` | [View](variants/4.11.0-docker-rootless-go-1.20.11) | | `:4.10.1` | [View](variants/4.10.1) | | `:4.10.1-docker` | [View](variants/4.10.1-docker) | -| `:4.10.1-docker-go-1.20.10` | [View](variants/4.10.1-docker-go-1.20.10) | +| `:4.10.1-docker-go-1.20.11` | [View](variants/4.10.1-docker-go-1.20.11) | | `:4.10.1-docker-rootless` | [View](variants/4.10.1-docker-rootless) | -| `:4.10.1-docker-rootless-go-1.20.10` | [View](variants/4.10.1-docker-rootless-go-1.20.10) | +| `:4.10.1-docker-rootless-go-1.20.11` | [View](variants/4.10.1-docker-rootless-go-1.20.11) | | `:4.9.1` | [View](variants/4.9.1) | | `:4.9.1-docker` | [View](variants/4.9.1-docker) | -| `:4.9.1-docker-go-1.20.10` | [View](variants/4.9.1-docker-go-1.20.10) | +| `:4.9.1-docker-go-1.20.11` | [View](variants/4.9.1-docker-go-1.20.11) | | `:4.9.1-docker-rootless` | [View](variants/4.9.1-docker-rootless) | -| `:4.9.1-docker-rootless-go-1.20.10` | [View](variants/4.9.1-docker-rootless-go-1.20.10) | +| `:4.9.1-docker-rootless-go-1.20.11` | [View](variants/4.9.1-docker-rootless-go-1.20.11) | | `:4.8.3` | [View](variants/4.8.3) | | `:4.8.3-docker` | [View](variants/4.8.3-docker) | -| `:4.8.3-docker-go-1.20.10` | [View](variants/4.8.3-docker-go-1.20.10) | +| `:4.8.3-docker-go-1.20.11` | [View](variants/4.8.3-docker-go-1.20.11) | | `:4.8.3-docker-rootless` | [View](variants/4.8.3-docker-rootless) | -| `:4.8.3-docker-rootless-go-1.20.10` | [View](variants/4.8.3-docker-rootless-go-1.20.10) | +| `:4.8.3-docker-rootless-go-1.20.11` | [View](variants/4.8.3-docker-rootless-go-1.20.11) | | `:4.7.1` | [View](variants/4.7.1) | | `:4.7.1-docker` | [View](variants/4.7.1-docker) | -| `:4.7.1-docker-go-1.20.10` | [View](variants/4.7.1-docker-go-1.20.10) | +| `:4.7.1-docker-go-1.20.11` | [View](variants/4.7.1-docker-go-1.20.11) | | `:4.7.1-docker-rootless` | [View](variants/4.7.1-docker-rootless) | -| `:4.7.1-docker-rootless-go-1.20.10` | [View](variants/4.7.1-docker-rootless-go-1.20.10) | +| `:4.7.1-docker-rootless-go-1.20.11` | [View](variants/4.7.1-docker-rootless-go-1.20.11) | | `:4.6.1` | [View](variants/4.6.1) | | `:4.6.1-docker` | [View](variants/4.6.1-docker) | -| `:4.6.1-docker-go-1.20.10` | [View](variants/4.6.1-docker-go-1.20.10) | +| `:4.6.1-docker-go-1.20.11` | [View](variants/4.6.1-docker-go-1.20.11) | | `:4.6.1-docker-rootless` | [View](variants/4.6.1-docker-rootless) | -| `:4.6.1-docker-rootless-go-1.20.10` | [View](variants/4.6.1-docker-rootless-go-1.20.10) | +| `:4.6.1-docker-rootless-go-1.20.11` | [View](variants/4.6.1-docker-rootless-go-1.20.11) | Base variants are based on `alpine`, and include `npm 8` and `nodejs 16` (to run `code-server`), `pwsh`, and basic tools. E.g. `4.18.0` diff --git a/generate/definitions/versions.json b/generate/definitions/versions.json index 3a2deec2..fee3dfc6 100644 --- a/generate/definitions/versions.json +++ b/generate/definitions/versions.json @@ -27,7 +27,7 @@ }, "go": { "versions": [ - "1.20.10" + "1.20.11" ], "versionsChangeScope": "minor", "versionsNewScript": "Invoke-WebRequest https://api.github.com/repos/golang/go/git/refs/tags | ConvertFrom-Json | % { $_.ref -replace 'refs/tags/go', '' } | ? { $_ -match '^\\d+\\.\\d+\\.\\d+$' } | Sort-Object { [version]$_ } -Descending | ? { [version]$_ -gt [version]'1.20' -and [version]$_ -lt [version]'1.21' } # Alternatively, use: https://go.dev/dl/?mode=json&include=all" diff --git a/variants/4.10.1-docker-go-1.20.11/Dockerfile b/variants/4.10.1-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..c5b9c371 --- /dev/null +++ b/variants/4.10.1-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.10.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.10.1-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.10.1-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.10.1-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.10.1-docker-go-1.20.11/settings.json b/variants/4.10.1-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.10.1-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.10.1-docker-rootless-go-1.20.11/Dockerfile b/variants/4.10.1-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..79a20515 --- /dev/null +++ b/variants/4.10.1-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.10.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.10.1-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.10.1-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.10.1-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.10.1-docker-rootless-go-1.20.11/settings.json b/variants/4.10.1-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.10.1-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.11.0-docker-go-1.20.11/Dockerfile b/variants/4.11.0-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..e80b3bdc --- /dev/null +++ b/variants/4.11.0-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.11.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.11.0-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.11.0-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.11.0-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.11.0-docker-go-1.20.11/settings.json b/variants/4.11.0-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.11.0-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.11.0-docker-rootless-go-1.20.11/Dockerfile b/variants/4.11.0-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..649d6245 --- /dev/null +++ b/variants/4.11.0-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.11.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.11.0-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.11.0-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.11.0-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.11.0-docker-rootless-go-1.20.11/settings.json b/variants/4.11.0-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.11.0-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.12.0-docker-go-1.20.11/Dockerfile b/variants/4.12.0-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..0d792501 --- /dev/null +++ b/variants/4.12.0-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.12.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.12.0-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.12.0-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.12.0-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.12.0-docker-go-1.20.11/settings.json b/variants/4.12.0-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.12.0-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.12.0-docker-rootless-go-1.20.11/Dockerfile b/variants/4.12.0-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..1711a8bd --- /dev/null +++ b/variants/4.12.0-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.12.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.12.0-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.12.0-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.12.0-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.12.0-docker-rootless-go-1.20.11/settings.json b/variants/4.12.0-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.12.0-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.13.0-docker-go-1.20.11/Dockerfile b/variants/4.13.0-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..6faadbe9 --- /dev/null +++ b/variants/4.13.0-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.13.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.13.0-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.13.0-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.13.0-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.13.0-docker-go-1.20.11/settings.json b/variants/4.13.0-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.13.0-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.13.0-docker-rootless-go-1.20.11/Dockerfile b/variants/4.13.0-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..21c9358d --- /dev/null +++ b/variants/4.13.0-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.13.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.13.0-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.13.0-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.13.0-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.13.0-docker-rootless-go-1.20.11/settings.json b/variants/4.13.0-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.13.0-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.14.1-docker-go-1.20.11/Dockerfile b/variants/4.14.1-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..3840a0d6 --- /dev/null +++ b/variants/4.14.1-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.14.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.14.1-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.14.1-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.14.1-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.14.1-docker-go-1.20.11/settings.json b/variants/4.14.1-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.14.1-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.14.1-docker-rootless-go-1.20.11/Dockerfile b/variants/4.14.1-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..b3e3e842 --- /dev/null +++ b/variants/4.14.1-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.14.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.14.1-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.14.1-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.14.1-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.14.1-docker-rootless-go-1.20.11/settings.json b/variants/4.14.1-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.14.1-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.15.0-docker-go-1.20.11/Dockerfile b/variants/4.15.0-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..206bd605 --- /dev/null +++ b/variants/4.15.0-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.15.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.15.0-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.15.0-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.15.0-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.15.0-docker-go-1.20.11/settings.json b/variants/4.15.0-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.15.0-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.15.0-docker-rootless-go-1.20.11/Dockerfile b/variants/4.15.0-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..3ed48b37 --- /dev/null +++ b/variants/4.15.0-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.15.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.15.0-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.15.0-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.15.0-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.15.0-docker-rootless-go-1.20.11/settings.json b/variants/4.15.0-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.15.0-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.16.1-docker-go-1.20.11/Dockerfile b/variants/4.16.1-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..98cb1c24 --- /dev/null +++ b/variants/4.16.1-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.16.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.16.1-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.16.1-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.16.1-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.16.1-docker-go-1.20.11/settings.json b/variants/4.16.1-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.16.1-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.16.1-docker-rootless-go-1.20.11/Dockerfile b/variants/4.16.1-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..f58d394c --- /dev/null +++ b/variants/4.16.1-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.16.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.16.1-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.16.1-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.16.1-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.16.1-docker-rootless-go-1.20.11/settings.json b/variants/4.16.1-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.16.1-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.17.1-docker-go-1.20.11/Dockerfile b/variants/4.17.1-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..d333648b --- /dev/null +++ b/variants/4.17.1-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.17 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/main npm~8 && apk add --no-cache nodejs~18 krb5-dev \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.17.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.17.1-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.17.1-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.17.1-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.17.1-docker-go-1.20.11/settings.json b/variants/4.17.1-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.17.1-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.17.1-docker-rootless-go-1.20.11/Dockerfile b/variants/4.17.1-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..24d07294 --- /dev/null +++ b/variants/4.17.1-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.17 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/main npm~8 && apk add --no-cache nodejs~18 krb5-dev \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.17.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.17.1-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.17.1-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.17.1-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.17.1-docker-rootless-go-1.20.11/settings.json b/variants/4.17.1-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.17.1-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.18.0-docker-go-1.20.11/Dockerfile b/variants/4.18.0-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..7ab8491d --- /dev/null +++ b/variants/4.18.0-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.17 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/main npm~8 && apk add --no-cache nodejs~18 krb5-dev \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.18.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.18.0-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.18.0-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.18.0-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.18.0-docker-go-1.20.11/settings.json b/variants/4.18.0-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.18.0-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.18.0-docker-rootless-go-1.20.11/Dockerfile b/variants/4.18.0-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..b5954ef3 --- /dev/null +++ b/variants/4.18.0-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.17 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.15/main npm~8 && apk add --no-cache nodejs~18 krb5-dev \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.18.0 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.18.0-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.18.0-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.18.0-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.18.0-docker-rootless-go-1.20.11/settings.json b/variants/4.18.0-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.18.0-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.6.1-docker-go-1.20.11/Dockerfile b/variants/4.6.1-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..b8cfeac5 --- /dev/null +++ b/variants/4.6.1-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.6.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.6.1-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.6.1-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.6.1-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.6.1-docker-go-1.20.11/settings.json b/variants/4.6.1-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.6.1-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.6.1-docker-rootless-go-1.20.11/Dockerfile b/variants/4.6.1-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..c1767911 --- /dev/null +++ b/variants/4.6.1-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.6.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.6.1-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.6.1-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.6.1-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.6.1-docker-rootless-go-1.20.11/settings.json b/variants/4.6.1-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.6.1-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.7.1-docker-go-1.20.11/Dockerfile b/variants/4.7.1-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..dc372f98 --- /dev/null +++ b/variants/4.7.1-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.7.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.7.1-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.7.1-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.7.1-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.7.1-docker-go-1.20.11/settings.json b/variants/4.7.1-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.7.1-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.7.1-docker-rootless-go-1.20.11/Dockerfile b/variants/4.7.1-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..24b707ea --- /dev/null +++ b/variants/4.7.1-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.7.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.7.1-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.7.1-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.7.1-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.7.1-docker-rootless-go-1.20.11/settings.json b/variants/4.7.1-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.7.1-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.8.3-docker-go-1.20.11/Dockerfile b/variants/4.8.3-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..7a4aea6e --- /dev/null +++ b/variants/4.8.3-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.8.3 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.8.3-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.8.3-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.8.3-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.8.3-docker-go-1.20.11/settings.json b/variants/4.8.3-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.8.3-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.8.3-docker-rootless-go-1.20.11/Dockerfile b/variants/4.8.3-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..b75d0cd3 --- /dev/null +++ b/variants/4.8.3-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.8.3 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.8.3-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.8.3-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.8.3-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.8.3-docker-rootless-go-1.20.11/settings.json b/variants/4.8.3-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.8.3-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.9.1-docker-go-1.20.11/Dockerfile b/variants/4.9.1-docker-go-1.20.11/Dockerfile new file mode 100644 index 00000000..5ec617ff --- /dev/null +++ b/variants/4.9.1-docker-go-1.20.11/Dockerfile @@ -0,0 +1,335 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.9.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.9.1-docker-go-1.20.11/docker-entrypoint.sh b/variants/4.9.1-docker-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..7e387902 --- /dev/null +++ b/variants/4.9.1-docker-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + echo "Starting dockerd" + sudo rm -fv /var/run/docker.pid + sudo dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.9.1-docker-go-1.20.11/settings.json b/variants/4.9.1-docker-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.9.1-docker-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file diff --git a/variants/4.9.1-docker-rootless-go-1.20.11/Dockerfile b/variants/4.9.1-docker-rootless-go-1.20.11/Dockerfile new file mode 100644 index 00000000..81b1ab7c --- /dev/null +++ b/variants/4.9.1-docker-rootless-go-1.20.11/Dockerfile @@ -0,0 +1,379 @@ +# syntax=docker/dockerfile:1 +FROM alpine:3.15 +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +RUN set -eu; \ + echo "TARGETPLATFORM=$TARGETPLATFORM"; \ + echo "TARGETOS=$TARGETOS"; \ + echo "TARGETARCH=$TARGETARCH"; \ + echo "TARGETVARIANT=$TARGETVARIANT"; \ + echo "BUILDPLATFORM=$BUILDPLATFORM"; \ + echo "BUILDOS=$BUILDOS"; \ + echo "BUILDARCH=$BUILDARCH"; \ + echo "BUILDVARIANT=$BUILDVARIANT"; + +RUN --mount=type=secret,id=GITHUB_TOKEN \ + DEPS='alpine-sdk bash libstdc++ libc6-compat python3' \ + && apk add --no-cache $DEPS \ + # Constraint to npm 8, or else npm will fail with 'npm ERR! python is not a valid npm option'. See: https://stackoverflow.com/questions/74522956/python-is-not-a-valid-npm-option and https://jubianchi.github.io/semver-check/#/~8/8 + && apk add --no-cache 'npm~8' 'nodejs~16' \ + && npm config set python python3 \ + && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --global code-server@4.9.1 --unsafe-perm \ + # Fix missing dependencies. See: https://github.com/coder/code-server/issues/5530 + && cd /usr/local/lib/node_modules/code-server/lib/vscode && GITHUB_TOKEN=$( cat /run/secrets/GITHUB_TOKEN ) npm install --legacy-peer-deps \ + && code-server --version \ + && apk del $DEPS + +# Install tools +RUN apk add --no-cache bash bash-completion ca-certificates curl gnupg git git-lfs github-cli iotop jq less lsblk make nano openssh-client openssl p7zip rsync tree yq + +# Install pwsh +# See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-alpine?view=powershell-7.3 +RUN apk add --no-cache \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs \ + curl +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust +RUN mkdir -p /opt/microsoft/powershell/7 \ + && curl -sSL https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/powershell-7.2.8-linux-alpine-x64.tar.gz | tar -C /opt/microsoft/powershell/7 -zxf - \ + && chmod +x /opt/microsoft/powershell/7/pwsh \ + && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_TELEMETRY_OPTOUT=1 +ENV POWERSHELL_UPDATECHECK=Off +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 +ENV DOTNET_TELEMETRY_OPTOUT=1 +ENV COMPlus_EnableDiagnostics=0 +RUN pwsh -version +# Install pwsh module(s) +RUN pwsh -c 'Install-Module Pester -Force -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -ErrorAction Stop' + +RUN apk add --no-cache sudo +RUN adduser -u 1000 --gecos '' -D user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user + +# Install common extensions +USER user +# beautify - code formatter +RUN code-server --install-extension hookyqr.beautify@1.4.11 +# docker +RUN code-server --install-extension ms-azuretools.vscode-docker@1.18.0 +# firefox +RUN code-server --install-extension firefox-devtools.vscode-firefox-debug@2.9.1 +# git +RUN code-server --install-extension donjayamanne.githistory@0.6.19 +RUN code-server --install-extension eamodio.gitlens@11.6.0 +# github. Install the latest compatible version +RUN code-server --install-extension github.vscode-pull-request-github +# gitlab +RUN code-server --install-extension gitlab.gitlab-workflow@3.60.0 +# jinja +RUN code-server --install-extension samuelcolvin.jinjahtml@0.16.0 +RUN code-server --install-extension wholroyd.jinja@0.0.8 +# kubernetes +RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools@1.3.11 +# markdown +RUN code-server --install-extension bierner.markdown-preview-github-styles@0.1.6 +RUN code-server --install-extension DavidAnson.vscode-markdownlint@0.43.2 +# prettier - code formatter +RUN code-server --install-extension esbenp.prettier-vscode@9.0.0 +# pwsh +RUN code-server --install-extension ms-vscode.powershell@2021.12.0 +# svg +RUN code-server --install-extension jock.svg@1.4.17 +# terraform +RUN code-server --install-extension hashicorp.terraform@2.14.0 +# toml +RUN code-server --install-extension bungcip.better-toml@0.3.2 +# vscode +RUN code-server --install-extension vscode-icons-team.vscode-icons@11.13.0 +# xml +RUN code-server --install-extension redhat.vscode-xml@0.18.0 +# yaml +RUN code-server --install-extension redhat.vscode-yaml@1.9.1 + +# Install docker +# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md +# Install docker-cli dependencies +USER root +RUN apk add --no-cache \ + ca-certificates \ + git \ + # Workaround for golang 1.15 not producing static binaries. See: https://github.com/containerd/containerd/issues/5824 + libc6-compat \ + openssh-client +# Install dockerd dependencies +RUN apk add --no-cache \ + btrfs-progs \ + e2fsprogs \ + e2fsprogs-extra \ + ip6tables \ + iptables \ + openssl \ + pigz \ + shadow-uidmap \ + xfsprogs \ + xz \ + zfs +# Add userns-remap support. See: https://docs.docker.com/engine/security/userns-remap/ +RUN set -eux; \ + addgroup -S dockremap; \ + adduser -S -G dockremap dockremap; \ + echo 'dockremap:231072:65536' >> /etc/subuid; \ + echo 'dockremap:231072:65536' >> /etc/subgid +# Install docker +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-20.10.24.tgz'; \ + ;; \ + 'armhf') \ + URL='https://download.docker.com/linux/static/stable/armel/docker-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-20.10.24.tgz'; \ + ;; \ + # These architectures are no longer supported as of docker 20.10.x + # 'ppc64le') \ + # URL='https://download.docker.com/linux/static/stable/ppc64le/docker-20.10.24.tgz'; \ + # ;; \ + # 's390x') \ + # URL='https://download.docker.com/linux/static/stable/s390x/docker-20.10.24.tgz'; \ + # ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker.tgz; \ + tar -xvf docker.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin; \ + ls -al /usr/local/bin; \ + rm -v docker.tgz; \ + containerd --version; \ + ctr --version; \ + docker --version; \ + dockerd --version; \ + runc --version +# Install bash completion +RUN wget -q https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker +# Post-install docker. See: https://docs.docker.com/engine/install/linux-postinstall/ +RUN set -eux; \ + addgroup docker; \ + adduser user docker; +VOLUME /var/lib/docker + +# Install rootless docker. See: https://docs.docker.com/engine/security/rootless/ +USER root +RUN apk add --no-cache iproute2 fuse-overlayfs +RUN set -eux; \ + echo user:100000:65536 >> /etc/subuid; \ + echo user:100000:65536 >> /etc/subgid +RUN set -eux; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL='https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'armv7') \ + URL='https://download.docker.com/linux/static/stable/armhf/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + 'aarch64') \ + URL='https://download.docker.com/linux/static/stable/aarch64/docker-rootless-extras-20.10.24.tgz'; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + wget -q "$URL" -O docker-rootless-extras.tgz; \ + tar -xvf docker-rootless-extras.tgz --strip-components=1 --no-same-owner --no-same-permissions -C /usr/local/bin \ + 'docker-rootless-extras/rootlesskit' \ + 'docker-rootless-extras/rootlesskit-docker-proxy' \ + 'docker-rootless-extras/vpnkit' \ + ; \ + ls -al /usr/local/bin; \ + rm -v docker-rootless-extras.tgz; \ + rootlesskit --version; \ + vpnkit --version +# Create XDG_RUNTIME_DIR +RUN mkdir /run/user && chmod 1777 /run/user +# Create /var/lib/docker +RUN mkdir -p /home/user/.local/share/docker && chown user:user /home/user/.local/share/docker +VOLUME /home/user/.local/share/docker +# Set env vars +ENV XDG_RUNTIME_DIR=/run/user/1000 +ENV DOCKER_HOST=unix:///run/user/1000/docker.sock + +# Install docker-compose v1 (deprecated, but for backward compatibility) +USER root +RUN apk add --no-cache docker-compose + +# Install docker-compose +RUN set -eux; \ + DOCKER_COMPOSE_VERSION=v2.23.0; \ + case "$( uname -m )" in \ + 'x86') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'x86_64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64; \ + SHA256=6e06123399e5428fbd603564afdac74821fa0a7b4465e8a1a2359b362fc42fc4; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv6; \ + SHA256=75889ad81c5b0b07805920e398eaa7fb41c1321c81942daa07a5b5c5a1a27bdb; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-armv7; \ + SHA256=2cd4af627462720384cfd2ba24d951854707d7c1fa37618c9e0319139f8a2012; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-aarch64; \ + SHA256=5c09e2c6b1cd9fc1be535690ee62712687ad12f0d08b14c27d30442f0e85b955; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-ppc64le; \ + SHA256=ff524f6d11050483abda01c5b1b33626c6c2f1b835df8514db6a42148d5095fc; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-riscv64; \ + SHA256=00302be14ad7d981eb86b834c09deb8186231b416c16454f9971bfcc0ec7e22f; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-s390x; \ + SHA256=323c2e92b3150ef94dc4201770e06ed7bacbe811abd77a23108cceea032fcf63; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-compose; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-compose /usr/libexec/docker/cli-plugins/docker-compose; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-compose; \ + docker compose version; \ + : + +# Install docker-buildx +RUN set -eux; \ + DOCKER_BUILDX_VERSION=v0.11.2; \ + case "$( uname -m )" in \ + 'x86_64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64; \ + SHA256=311568ee69715abc46163fd688e56c77ab0144ff32e116d0f293bfc3470e75b7; \ + ;; \ + 'armhf') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v6; \ + SHA256=c1bab0c7374406d5069f60b291971d71161fbd3c00e8a8fb1b68b9053eda8a4e; \ + ;; \ + 'armv7l') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm-v7; \ + SHA256=4defdf463ca2516d3f58fef69a6f78cbbb8baf16d936cdfc54df4a4be0d48f7f; \ + ;; \ + 'aarch64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64; \ + SHA256=565e36085a35bba5104f37365ba796c111338eea1a0902b3a7ff42e2e1248815; \ + ;; \ + 'ppc64le') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-ppc64le; \ + SHA256=c5f5cb9957890873a537c7ff5c4eef36132339622baeabb37a4b9b7251ddf836; \ + ;; \ + 'riscv64') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-riscv64; \ + SHA256=c0adc4b4625f7e3df7dcdec840568f918673f2ed4bcd03ca1e63ea2a5627ca35; \ + ;; \ + 's390x') \ + URL=https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-s390x; \ + SHA256=02916c76c3872fd0b3fa57e71403fee92b6be10f350b96a5ff99e7914dd277b8; \ + ;; \ + *) \ + echo "Architecture not supported"; \ + exit 1; \ + ;; \ + esac; \ + FILE=docker-buildx; \ + wget -q "$URL" -O "$FILE"; \ + echo "$SHA256 $FILE" | sha256sum -c -; \ + mkdir -pv /usr/libexec/docker/cli-plugins; \ + mv -v docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx; \ + chmod +x /usr/libexec/docker/cli-plugins/docker-buildx; \ + docker buildx version; \ + : + +# Install binary tool(s) +RUN set -eux; \ + wget https://github.com/GoogleContainerTools/container-diff/releases/download/v0.17.0/container-diff-linux-amd64 -O container-diff; \ + sha256sum container-diff | grep '^818c219ce9f9670cd5c766b9da5036cf75bbf98bc99eb258f5e8f90e80367c88 '; \ + mv container-diff /usr/local/bin/container-diff; \ + chmod +x /usr/local/bin/container-diff; \ + container-diff version + +# Install golang binaries from official golang image +# See: https://go.dev/dl/ +USER root +ENV GOLANG_VERSION 1.20.11 +ENV PATH=/usr/local/go/bin:$PATH +COPY --from=golang:1.20.11-alpine /usr/local/go /usr/local/go +RUN go version + +# Install development tools +RUN set -eux; \ + export GOBIN=/usr/local/bin; \ + go install github.com/go-delve/delve/cmd/dlv@v1.20.1; \ + dlv version; \ + go install golang.org/x/tools/gopls@v0.11.0; \ + gopls version; \ + rm -rf ~/go; + +# Install extensions +USER user +RUN code-server --install-extension golang.go@0.38.0 + +# Add a default settings.json +USER user +COPY --chown=1000:1000 settings.json /home/user/.local/share/code-server/User/settings.json + +# Remove the default code-server config file created when extensions are installed +USER user +RUN rm -fv ~/.config/code-server/config.yaml + +# Symlink code to code-server +USER root +RUN ln -sfn /usr/local/bin/code-server /usr/local/bin/code + +USER root +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh + +ENV LANG=en_US.UTF-8 +USER user +WORKDIR /home/user +ENTRYPOINT [ "/docker-entrypoint.sh" ] +CMD [ "--bind-addr=0.0.0.0:8080", "--disable-telemetry", "--disable-update-check" ] diff --git a/variants/4.9.1-docker-rootless-go-1.20.11/docker-entrypoint.sh b/variants/4.9.1-docker-rootless-go-1.20.11/docker-entrypoint.sh new file mode 100644 index 00000000..e3f7fd09 --- /dev/null +++ b/variants/4.9.1-docker-rootless-go-1.20.11/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +set -eu + +# See: https://github.com/docker-library/official-images#consistency +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- code-server "$@" +fi +if [ "$1" = 'code-server' ]; then + # Start rootless docker + # See: https://github.com/moby/moby/blob/v20.10.22/contrib/dockerd-rootless.sh + # See: https://github.com/docker-library/docker/blob/master/20.10/dind/dockerd-entrypoint.sh + echo "Starting rootless dockerd" + rootlesskit \ + --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-vpnkit}" \ + --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ + --disable-host-loopback \ + --port-driver="${DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER:-builtin}" \ + --copy-up=/etc \ + --copy-up=/run \ + --propagation=rslave \ + ${DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS:-} \ + dockerd & + + echo "Starting code-server" + exec code-server "$@" +fi +exec "$@" diff --git a/variants/4.9.1-docker-rootless-go-1.20.11/settings.json b/variants/4.9.1-docker-rootless-go-1.20.11/settings.json new file mode 100644 index 00000000..2c0c4607 --- /dev/null +++ b/variants/4.9.1-docker-rootless-go-1.20.11/settings.json @@ -0,0 +1,24 @@ +{ + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "extensions.showRecommendationsOnlyOnDemand": true, + "npm.fetchOnlinePackageInfo": false, + "telemetry.enableTelemetry": false, + "telemetry.telemetryLevel": "off", + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": false, + "typescript.surveys.enabled": false, + "workbench.enableExperiments": false, + "workbench.iconTheme": "vscode-icons", + "workbench.settings.enableNaturalLanguageSearch": false, + "workbench.startupEditor": "none", + "workbench.welcomePage.walkthroughs.openOnInstall": false, + "workbench.tips.enabled": false, + + // Extension-specific + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "redhat.telemetry.enabled": false, + "vsicons.dontShowNewVersionMessage": true, +} \ No newline at end of file