Skip to content

Commit 3cc8e4b

Browse files
authored
Upgrade to sysbox 0.7.0 (#163)
1 parent a1fd201 commit 3cc8e4b

6 files changed

Lines changed: 25 additions & 22 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ jobs:
195195
run: exit 0
196196

197197
- name: Run Trivy vulnerability scanner
198-
uses: aquasecurity/trivy-action@0.29.0
198+
uses: aquasecurity/trivy-action@0.34.2
199199
with:
200200
image-ref: envbox:latest
201201
format: sarif
@@ -270,6 +270,6 @@ jobs:
270270
- name: Tag and push envbox-preview
271271
run: |
272272
VERSION=$(./scripts/version.sh)-dev-$(git rev-parse --short HEAD)
273-
BASE=ghcr.io/coder/envbox-preview
273+
BASE=ghcr.io/${{ github.repository_owner }}/envbox-preview
274274
docker tag envbox "${BASE}:${VERSION}"
275275
docker push "${BASE}:${VERSION}"

.github/workflows/latest.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
password: ${{ secrets.GITHUB_TOKEN }}
3737
- name: Create Manifest
3838
run: |
39-
docker manifest create ghcr.io/coder/envbox:latest \
40-
--amend ghcr.io/coder/envbox:${{ github.event.inputs.tag }}-amd64 \
41-
--amend ghcr.io/coder/envbox:${{ github.event.inputs.tag }}-arm64
39+
docker manifest create ghcr.io/${{ github.repository_owner }}/envbox:latest \
40+
--amend ghcr.io/${{ github.repository_owner }}/envbox:${{ github.event.inputs.tag }}-amd64 \
41+
--amend ghcr.io/${{ github.repository_owner }}/envbox:${{ github.event.inputs.tag }}-arm64
4242
4343
- name: Push Manifest
4444
run: |
45-
docker manifest push ghcr.io/coder/envbox:latest
45+
docker manifest push ghcr.io/${{ github.repository_owner }}/envbox:latest

.github/workflows/release.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
include:
3232
- os: ubuntu-22.04
3333
arch: linux/amd64
34-
sha: b7ac389e5a19592cadf16e0ca30e40919516128f6e1b7f99e1cb4ff64554172e
34+
sha: eeff273671467b8fa351ab3d40709759462dc03d9f7b50a1b207b37982ce40a9
3535
arch-suffix: amd64
3636
- os: depot-ubuntu-22.04-arm
3737
arch: linux/arm64
38-
sha: 16d80123ba53058cf90f5a68686e297621ea97942602682e34b3352783908f91
38+
sha: eae9c0e91ddd39bd1826d6a7a313a73d42a8449ef5113e9d6d118b559cb809ba
3939
arch-suffix: arm64
4040
runs-on: ${{ matrix.os }}
4141
steps:
@@ -79,10 +79,10 @@ jobs:
7979
run: make -j ARCH=${{ matrix.arch }} SYSBOX_SHA=${{ matrix.sha }} build/image/envbox
8080

8181
- name: Tag Image
82-
run: docker tag envbox ghcr.io/coder/envbox:${{ github.event.inputs.version }}-${{ matrix.arch-suffix }}
82+
run: docker tag envbox ghcr.io/${{ github.repository_owner }}/envbox:${{ github.event.inputs.version }}-${{ matrix.arch-suffix }}
8383

8484
- name: Push Image
85-
run: docker push ghcr.io/coder/envbox:${{ github.event.inputs.version }}-${{ matrix.arch-suffix }}
85+
run: docker push ghcr.io/${{ github.repository_owner }}/envbox:${{ github.event.inputs.version }}-${{ matrix.arch-suffix }}
8686
manifest:
8787
runs-on: ubuntu-22.04
8888
needs: release
@@ -100,12 +100,12 @@ jobs:
100100
password: ${{ secrets.GITHUB_TOKEN }}
101101
- name: Create Manifest
102102
run: |
103-
docker manifest create ghcr.io/coder/envbox:${{ github.event.inputs.version }} \
104-
--amend ghcr.io/coder/envbox:${{ github.event.inputs.version }}-amd64 \
105-
--amend ghcr.io/coder/envbox:${{ github.event.inputs.version }}-arm64
103+
docker manifest create ghcr.io/${{ github.repository_owner }}/envbox:${{ github.event.inputs.version }} \
104+
--amend ghcr.io/${{ github.repository_owner }}/envbox:${{ github.event.inputs.version }}-amd64 \
105+
--amend ghcr.io/${{ github.repository_owner }}/envbox:${{ github.event.inputs.version }}-arm64
106106
- name: Push Manifest
107107
run: |
108-
docker manifest push ghcr.io/coder/envbox:${{ github.event.inputs.version }}
108+
docker manifest push ghcr.io/${{ github.repository_owner }}/envbox:${{ github.event.inputs.version }}
109109
110110
tag:
111111
runs-on: ubuntu-22.04

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PROJECT_ROOT := $(shell git rev-parse --show-toplevel)
22
GO_FILES := $(shell git ls-files '*.go' '*.sum')
33
IMAGE_FILES := $(shell find deploy)
44
ARCH ?= linux/amd64
5-
SYSBOX_SHA ?= b7ac389e5a19592cadf16e0ca30e40919516128f6e1b7f99e1cb4ff64554172e
5+
SYSBOX_SHA ?= eeff273671467b8fa351ab3d40709759462dc03d9f7b50a1b207b37982ce40a9
66

77
.PHONY: clean
88
clean:

deploy/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
FROM ubuntu:jammy
33

44
ARG TARGETARCH
5-
# This should be updated in the Makefile whenever the version is changed.
5+
# This should be updated in the Makefile whenever the version is changed.
66
# We don't hardcode it here because we have to be able to build both
77
# amd and arm
88
ARG SYSBOX_SHA
9-
ARG SYSBOX_VERSION="0.6.7"
9+
ARG SYSBOX_VERSION="0.7.0"
1010
ARG SYSBOX_DEB="sysbox-ce_$SYSBOX_VERSION-0.linux_$TARGETARCH.deb"
1111

1212
# Copy configuration files to appropriate locations
@@ -20,9 +20,9 @@ LABEL \
2020

2121
# Basic utilities
2222
ARG DEBIAN_FRONTEND=noninteractive
23-
# Pin docker to avoid any breaking API changes between the Go client and
24-
# the server.
25-
ARG DOCKER_VERSION="5:27.3.1-1~ubuntu.22.04~jammy"
23+
# Pin docker to avoid any breaking API changes between the Go client and
24+
# the server. Use latest LTS/stable from https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/
25+
ARG DOCKER_VERSION="5:29.2.1-1~ubuntu.22.04~jammy"
2626
# Ignore other repositories, as some require HTTPS
2727
RUN apt-get update --quiet --option Dir::Etc::SourceParts="" && \
2828
apt-get upgrade -y && \
@@ -33,7 +33,7 @@ RUN apt-get update --quiet --option Dir::Etc::SourceParts="" && \
3333
ca-certificates \
3434
curl \
3535
dialog \
36-
fuse \
36+
fuse3 \
3737
iproute2 \
3838
jq \
3939
kmod \

dockerutil/client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ func WithClient(ctx context.Context, client Client) context.Context {
3232
func ExtractClient(ctx context.Context) (Client, error) {
3333
client := ctx.Value(clientKey{})
3434
if client == nil {
35-
client, err := dockerclient.NewClientWithOpts(dockerclient.FromEnv)
35+
client, err := dockerclient.NewClientWithOpts(
36+
dockerclient.FromEnv,
37+
dockerclient.WithAPIVersionNegotiation(), // use daemon's max API (e.g. 1.47) so we don't exceed it
38+
)
3639
if err != nil {
3740
return nil, xerrors.Errorf("new env client: %w", err)
3841
}

0 commit comments

Comments
 (0)