Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions g3doc/user_guide/tutorials/docker-in-gke-sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ applications.
In gVisor, all basic docker commands should function as expected. The host
network driver and the bridge network driver are tested and supported.

> gVisor supports Docker Engine up to version 27 in GKE.

## How to run Docker in a GKE Sandbox

### GKE standard cluster
Expand All @@ -25,15 +27,15 @@ granted by the gVisor sandbox.
An example command to start an GKE autopilot cluster will be:

```sh
gcloud container clusters create-auto [CLUTER_NAME] --workload-policies=allow-net-admin --location=[LOCATION] --cluster-version=1.33.2-gke.4655000
gcloud container clusters create-auto [CLUTER_NAME] --workload-policies=allow-net-admin --location=[LOCATION]
```

### Get started

Prepare a container image with pre-installed Docker:

```shell
$ docker build -t docker-in-gvisor images/basic/docker
$ docker build -t docker-in-gvisor images/basic/docker/
$ docker push {registry_url}/docker-in-gvisor:latest
```

Expand Down
2 changes: 2 additions & 0 deletions g3doc/user_guide/tutorials/docker-in-gvisor.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ applications.
In gVisor, all basic docker commands should function as expected. The host
network driver and the bridge network driver are tested and supported.

> gVisor supports Docker Engine up to version 28.

### NOTE on runsc setup

To run docker within gvisor, runsc must be enabled to allow raw sockets. This is
Expand Down
3 changes: 2 additions & 1 deletion images/basic/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM ubuntu:24.04

ARG DOCKER_VERSION="5:27.5.1-1~ubuntu.24.04~noble"
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update && apt-get -y install ca-certificates curl
# TODO(gvisor.dev/issue/11883): use the latest docker version.
Expand All @@ -8,7 +9,7 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list && \
apt-get update && \
apt-get install -qqy docker-ce=5:28.5.2-1~ubuntu.24.04~noble docker-ce-cli=5:28.5.2-1~ubuntu.24.04~noble containerd.io docker-buildx-plugin docker-compose-plugin iproute2
apt-get install -qqy docker-ce=${DOCKER_VERSION} docker-ce-cli=${DOCKER_VERSION} containerd.io docker-buildx-plugin docker-compose-plugin iproute2

COPY start-dockerd.sh .
CMD /start-dockerd.sh
Loading