Skip to content

Commit 8af2092

Browse files
authored
Upgrade the docker version to 23.0.6 (#5436)
* Upgrade the docker version to 23.0.6 * Maximize build space * Revert cleaning up docker volumes
1 parent 4fac03a commit 8af2092

File tree

12 files changed

+25
-25
lines changed

12 files changed

+25
-25
lines changed

ansible/group_vars/all

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ invoker:
212212
userCpus: "{{ invoker_user_cpus | default() }}"
213213
# Specify if it is allowed to deploy more than 1 invoker on a single machine.
214214
allowMultipleInstances: "{{ invoker_allow_multiple_instances | default(false) }}"
215-
# Specify if it should use docker-runc or docker to pause/unpause containers
215+
# Specify if it should use runc or docker to pause/unpause containers
216216
useRunc: "{{ invoker_use_runc | default(true) }}"
217217
docker:
218218
become: "{{ invoker_docker_become | default(false) }}"

ansible/roles/invoker/tasks/clean.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@
6666
- name: pause/resume at runc-level to restore docker consistency
6767
shell: |
6868
DOCKER_PAUSED=$(docker ps --filter status=paused --filter name=wsk{{ invoker_index }} -q --no-trunc)
69-
for C in $DOCKER_PAUSED; do docker-runc --root {{ invoker.docker.runcdir }} pause $C; done
69+
for C in $DOCKER_PAUSED; do runc --root {{ invoker.docker.runcdir }} pause $C; done
7070
DOCKER_RUNNING=$(docker ps --filter status=running --filter name=wsk{{ invoker_index }} -q --no-trunc)
71-
for C2 in $DOCKER_RUNNING; do docker-runc --root {{ invoker.docker.runcdir }} resume $C2; done
71+
for C2 in $DOCKER_RUNNING; do runc --root {{ invoker.docker.runcdir }} resume $C2; done
7272
TOTAL=$(($(echo $DOCKER_PAUSED | wc -w)+$(echo $DOCKER_RUNNING | wc -w)))
7373
echo "Handled $TOTAL remaining actions."
7474
register: runc_output

ansible/roles/invoker/tasks/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@
383383
{{ docker_sock | default('/var/run/docker.sock') }}:/var/run/docker.sock"
384384
###
385385
# The root runc directory varies based on the version of docker and runc.
386-
# When docker>=18.06 uses docker-runc the directory is /run/docker/runtime-runc/moby.
387-
# While docker-runc itself uses /run/runc for a root user or /run/user/<uid>/runc for a non-root user.
386+
# When docker>=18.06 uses runc the directory is /run/docker/runtime-runc/moby.
387+
# While runc itself uses /run/runc for a root user or /run/user/<uid>/runc for a non-root user.
388388
# Currently, the invoker is running as a root user so the below configuration works as expected.
389389
# But when the invoker needs to run as a non-root user or the version docker needs to be changed,
390390
# the following configuration should be properly updated as well.

core/controller/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ ENV SWAGGER_UI_DOWNLOAD_SHA256=3d7ef5ddc59e10f132fe99771498f0f1ba7a2cbfb9585f986
2828
# If you change the docker version here, it has implications on invoker runc support.
2929
# Docker server version and the invoker docker version must be the same to enable runc usage.
3030
# If this cannot be guaranteed, set `invoker_use_runc: false` in the ansible env.
31-
ENV DOCKER_VERSION=18.06.3-ce
31+
ENV DOCKER_VERSION=23.0.6
3232

3333
RUN apk add --update openssl
3434

3535
# Uncomment to fetch latest version of docker instead: RUN wget -qO- https://get.docker.com | sh
3636
# Install docker client
3737
RUN curl -sSL -o docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz && \
3838
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
39-
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker-runc && \
39+
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/runc && \
4040
rm -f docker-${DOCKER_VERSION}.tgz && \
4141
chmod +x /usr/bin/docker && \
42-
chmod +x /usr/bin/docker-runc
42+
chmod +x /usr/bin/runc
4343
##################################################################################################
4444

4545
# Install swagger-ui

core/controller/Dockerfile-debian

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ ENV SWAGGER_UI_DOWNLOAD_SHA256=3d7ef5ddc59e10f132fe99771498f0f1ba7a2cbfb9585f986
2828
# If you change the docker version here, it has implications on invoker runc support.
2929
# Docker server version and the invoker docker version must be the same to enable runc usage.
3030
# If this cannot be guaranteed, set `invoker_use_runc: false` in the ansible env.
31-
ENV DOCKER_VERSION=18.06.3-ce
31+
ENV DOCKER_VERSION=23.0.6
3232

3333
RUN apt-get -y install openssl
3434

3535
# Uncomment to fetch latest version of docker instead: RUN wget -qO- https://get.docker.com | sh
3636
# Install docker client
3737
RUN curl -sSL -o docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz && \
3838
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
39-
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker-runc && \
39+
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/runc && \
4040
rm -f docker-${DOCKER_VERSION}.tgz && \
4141
chmod +x /usr/bin/docker && \
42-
chmod +x /usr/bin/docker-runc
42+
chmod +x /usr/bin/runc
4343
##################################################################################################
4444

4545
# Install swagger-ui

core/invoker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FROM scala
1919

2020
ENV UID=1001 \
2121
NOT_ROOT_USER=owuser \
22-
DOCKER_VERSION=18.06.3-ce
22+
DOCKER_VERSION=23.0.6
2323
# If you change the docker version here, it has implications on invoker runc support.
2424
# Docker server version and the invoker docker version must be the same to enable runc usage.
2525
# If this cannot be guaranteed, set `invoker_use_runc: false` in the ansible env.
@@ -31,10 +31,10 @@ RUN apk add --update openssl
3131
# Install docker client
3232
RUN curl -sSL -o docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz && \
3333
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
34-
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker-runc && \
34+
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/runc && \
3535
rm -f docker-${DOCKER_VERSION}.tgz && \
3636
chmod +x /usr/bin/docker && \
37-
chmod +x /usr/bin/docker-runc
37+
chmod +x /usr/bin/runc
3838

3939
ADD build/distributions/invoker.tar ./
4040

core/invoker/Dockerfile-debian

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FROM scala
1919

2020
ENV UID=1001 \
2121
NOT_ROOT_USER=owuser
22-
ENV DOCKER_VERSION=18.06.3-ce
22+
ENV DOCKER_VERSION=23.0.6
2323
# If you change the docker version here, it has implications on invoker runc support.
2424
# Docker server version and the invoker docker version must be the same to enable runc usage.
2525
# If this cannot be guaranteed, set `invoker_use_runc: false` in the ansible env.
@@ -31,10 +31,10 @@ RUN apt-get -y install openssl
3131
# Install docker client
3232
RUN curl -sSL -o docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz && \
3333
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker && \
34-
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker-runc && \
34+
tar --strip-components 1 -xvzf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/runc && \
3535
rm -f docker-${DOCKER_VERSION}.tgz && \
3636
chmod +x /usr/bin/docker && \
37-
chmod +x /usr/bin/docker-runc
37+
chmod +x /usr/bin/runc
3838

3939
ADD build/distributions/invoker.tar ./
4040

core/invoker/src/main/resources/application.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ whisk {
5050
}
5151

5252
docker.container-factory {
53-
# Use runc (docker-runc) for pause/resume functionality in DockerContainerFactory
53+
# Use runc for pause/resume functionality in DockerContainerFactory
5454
use-runc: true
5555
}
5656

core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/DockerContainer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ object DockerContainer {
5555
* @param network network to launch the container in
5656
* @param dnsServers list of dns servers to use in the container
5757
* @param name optional name for the container
58-
* @param useRunc use docker-runc to pause/unpause container?
58+
* @param useRunc use runc to pause/unpause container?
5959
* @return a Future which either completes with a DockerContainer or one of two specific failures
6060
*/
6161
def create(transid: TransactionId,

core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/docker/RuncClient.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class RuncClient(timeouts: RuncClientTimeouts = loadConfigOrThrow[RuncClientTime
5656

5757
// Determines how to run docker. Failure to find a Docker binary implies
5858
// a failure to initialize this instance of DockerClient.
59-
protected val runcCmd: Seq[String] = Seq("/usr/bin/docker-runc")
59+
protected val runcCmd: Seq[String] = Seq("/usr/bin/runc")
6060

6161
def pause(id: ContainerId)(implicit transid: TransactionId): Future[Unit] =
6262
runCmd(Seq("pause", id.asString), timeouts.pause).map(_ => ())

0 commit comments

Comments
 (0)