Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.09] Add socket activation for RHEL based distributions #274

Merged
merged 1 commit into from
Nov 30, 2018
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: 1 addition & 5 deletions deb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN=docker run --rm -i \
-v $(CURDIR)/debbuild/$@:/build \
debbuild-$@/$(ARCH)

SOURCE_FILES=engine-image cli.tgz docker.service docker.socket 00-socket-activation.conf distribution_based_engine.json
SOURCE_FILES=engine-image cli.tgz docker.service docker.socket distribution_based_engine.json
SOURCES=$(addprefix sources/, $(SOURCE_FILES))

.PHONY: help
Expand Down Expand Up @@ -121,10 +121,6 @@ sources/docker.socket: ../systemd/docker.socket
mkdir -p $(@D)
cp $< $@

sources/00-socket-activation.conf: ../systemd/00-socket-activation.conf
mkdir -p $(@D)
cp $< $@

sources/distribution_based_engine.json: sources/engine-image
mkdir -p $(@D)
docker inspect "$(shell cat $<)" \
Expand Down
1 change: 0 additions & 1 deletion deb/common/rules
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ override_dh_auto_install:
# docker-ce install
install -D -m 0644 /sources/docker.service debian/docker-ce/lib/systemd/system/docker.service
install -D -m 0644 /sources/docker.socket debian/docker-ce/lib/systemd/system/docker.socket
install -D -m 0644 /sources/00-socket-activation.conf debian/docker-ce/lib/systemd/system/docker.service.d/00-socket-activation.conf
install -D -m 0755 /source/dockerd debian/docker-ce/usr/bin/dockerd-ce
install -D -m 0755 /source/docker-proxy debian/docker-ce/usr/bin/docker-proxy
install -D -m 0755 /source/docker-init debian/docker-ce/usr/bin/docker-init
Expand Down
6 changes: 5 additions & 1 deletion rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RPMBUILD_FLAGS?=-ba\
$(SPECS)
RUN?=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS)

SOURCE_FILES=engine-image cli.tgz docker.service distribution_based_engine.json
SOURCE_FILES=engine-image cli.tgz docker.service docker.socket distribution_based_engine.json
SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES))


Expand Down Expand Up @@ -112,6 +112,10 @@ rpmbuild/SOURCES/docker.service: ../systemd/docker.service
mkdir -p $(@D)
cp $< $@

rpmbuild/SOURCES/docker.socket: ../systemd/docker.socket
mkdir -p $(@D)
cp $< $@

rpmbuild/SOURCES/engine-image:
$(MAKE) -C ../image image-linux-dm
mkdir -p $(@D)
Expand Down
3 changes: 3 additions & 0 deletions rpm/SPECS/docker-ce.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Version: %{_version}
Release: %{_release}%{?dist}
Epoch: 3
Source0: docker.service
Source1: docker.socket
Summary: The open-source application container engine
Group: Tools/Docker
License: ASL 2.0
Expand Down Expand Up @@ -63,13 +64,15 @@ install -D -m 0755 /sources/dockerd $RPM_BUILD_ROOT/%{_bindir}/dockerd-ce
install -D -m 0755 /sources/docker-proxy $RPM_BUILD_ROOT/%{_bindir}/docker-proxy
install -D -m 0755 /sources/docker-init $RPM_BUILD_ROOT/%{_bindir}/docker-init
install -D -m 0644 %{_topdir}/SOURCES/docker.service $RPM_BUILD_ROOT/%{_unitdir}/docker.service
install -D -m 0644 %{_topdir}/SOURCES/docker.socket $RPM_BUILD_ROOT/%{_unitdir}/docker.socket
install -D -m 0644 %{_topdir}/SOURCES/distribution_based_engine.json $RPM_BUILD_ROOT/var/lib/docker-engine/distribution_based_engine-ce.json

%files
/%{_bindir}/dockerd-ce
/%{_bindir}/docker-proxy
/%{_bindir}/docker-init
/%{_unitdir}/docker.service
/%{_unitdir}/docker.socket
/var/lib/docker-engine/distribution_based_engine-ce.json

%pre
Expand Down
7 changes: 0 additions & 7 deletions systemd/00-socket-activation.conf

This file was deleted.

2 changes: 1 addition & 1 deletion systemd/docker.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd
ExecStart=/usr/bin/dockerd -H fd://
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Expand Down