diff --git a/common/dockerd.json b/common/dockerd.json index e220755089..d09197cafa 100644 --- a/common/dockerd.json +++ b/common/dockerd.json @@ -1,11 +1,11 @@ { - "image": "${ENGINE_IMAGE}", - "namespace":"docker", - "args": [ - "-s", "overlay", - "--containerd", "/run/containerd/containerd.sock", - "--default-runtime", "containerd", - "--add-runtime", "containerd=runc" - ], - "scope": "ce" + "image": "docker.io/seemethere/engine-community:0.0.0-20180814124044-678d4b3a6d.x86_64", + "namespace":"docker", + "args": [ + "-s", "overlay", + "--containerd", "/run/containerd/containerd.sock", + "--default-runtime", "containerd", + "--add-runtime", "containerd=runc" + ], + "scope": "ce" } diff --git a/containerd.mk b/containerd.mk index f448a611e0..be11a9f392 100644 --- a/containerd.mk +++ b/containerd.mk @@ -1,7 +1,7 @@ # Common things for containerd functionality -CONTAINERD_PROXY_COMMIT=6615ae0be4014152533a83d44cdf9d3baa600d19 -CONTAINERD_SHIM_PROCESS_IMAGE=docker.io/docker/containerd-shim-process:a4d1531 +CONTAINERD_PROXY_COMMIT=82ae3d13e91d062dd4853379fe018638023c8da2 +CONTAINERD_SHIM_PROCESS_IMAGE=docker.io/docker/containerd-shim-process:ff98a47 # If the docker-containerd.sock is available use that, else use the default containerd.sock ifeq (,$(wildcard /var/run/docker/containerd/docker-containerd.sock)) diff --git a/image/Makefile b/image/Makefile index 180ee81b82..49fb98721a 100644 --- a/image/Makefile +++ b/image/Makefile @@ -3,7 +3,7 @@ ENGINE_DIR:=$(CURDIR)/../../engine CLI_DIR:=$(CURDIR)/../../cli VERSION?=0.0.0-dev STATIC_VERSION=$(shell ../static/gen-static-ver $(ENGINE_DIR) $(VERSION)) -DOCKER_HUB_ORG?=docker +DOCKER_HUB_ORG?=dockereng ARCH=$(shell uname -m) ENGINE_IMAGE?=engine-community diff --git a/rpm/Makefile b/rpm/Makefile index 58defa88c5..365d0ceecd 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -100,3 +100,5 @@ rpmbuild/SOURCES/docker.service: ../systemd/docker.service rpmbuild/SOURCES/dockerd.json: ../common/dockerd.json mkdir -p $(@D) cp $< $@ + +# TODO: Figure out a sufficient offline solution diff --git a/rpm/SPECS/docker-ce.spec b/rpm/SPECS/docker-ce.spec index 5b851b8200..e5714f176c 100644 --- a/rpm/SPECS/docker-ce.spec +++ b/rpm/SPECS/docker-ce.spec @@ -73,18 +73,18 @@ install -D -m 0644 %{_topdir}/SOURCES/dockerd.json $RPM_BUILD_ROOT/etc/container /etc/containerd-proxy/dockerd.json %pre -if [ $1 -gt 0 ] ; then - # package upgrade scenario, before new files are installed - - # clear any old state - rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || : - - # check if docker service is running - if systemctl is-active docker > /dev/null 2>&1; then - systemctl stop docker > /dev/null 2>&1 || : - touch %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || : - fi -fi +# if [ $1 -gt 0 ] ; then +# # package upgrade scenario, before new files are installed +# +# # clear any old state +# rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || : +# +# # check if docker service is running +# if systemctl is-active docker > /dev/null 2>&1; then +# systemctl stop docker > /dev/null 2>&1 || : +# touch %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || : +# fi +# fi %post %systemd_post docker @@ -99,14 +99,14 @@ fi %systemd_postun_with_restart docker %posttrans -if [ $1 -ge 0 ] ; then - # package upgrade scenario, after new files are installed - - # check if docker was running before upgrade - if [ -f %{_localstatedir}/lib/rpm-state/docker-is-active ]; then - systemctl start docker > /dev/null 2>&1 || : - rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || : - fi -fi +# if [ $1 -ge 0 ] ; then +# # package upgrade scenario, after new files are installed +# +# # check if docker was running before upgrade +# if [ -f %{_localstatedir}/lib/rpm-state/docker-is-active ]; then +# systemctl start docker > /dev/null 2>&1 || : +# rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || : +# fi +# fi %changelog diff --git a/systemd/docker.service b/systemd/docker.service index 0e0265a8c0..438d8bb5ef 100644 --- a/systemd/docker.service +++ b/systemd/docker.service @@ -5,28 +5,16 @@ After=network-online.target firewalld.service containerd.service Wants=network-online.target containerd.service [Service] -Type=notify # Install containerd-shim-process if it's not already installed ExecStartPre=/usr/libexec/containerd-offline-installer /var/lib/containerd/containerd-shim-process.tar docker.io/docker/containerd-shim-process ExecStart=/usr/bin/dockerd -ExecReload=/bin/kill -s HUP $MAINPID -# Having non-zero Limit*s causes performance problems due to accounting overhead -# in the kernel. We recommend using cgroups to do container-local accounting. -LimitNOFILE=infinity -LimitNPROC=infinity -LimitCORE=infinity -# Uncomment TasksMax if your systemd version supports it. -# Only systemd 226 and above support this version. -#TasksMax=infinity -TimeoutStartSec=0 -# set delegate yes so that systemd does not reset the cgroups of docker containers -Delegate=yes -# kill only the docker process, not all processes in the cgroup +TimeoutSec=infinity KillMode=process -# restart the docker process if it exits prematurely -Restart=on-failure -StartLimitBurst=3 -StartLimitInterval=60s +Restart=always +Delegate=yes +# On RPM Based distributions PATH isn't defined so we define it here +# /opt/containerd/bin is in front so dockerd grabs the correct runc binary +Environment="PATH=/opt/containerd/bin:/sbin:/usr/bin:/usr/local/bin:$PATH" [Install] WantedBy=multi-user.target