Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyjob authored and embtom committed Aug 8, 2021
1 parent 363fc78 commit 38dfe92
Show file tree
Hide file tree
Showing 12 changed files with 154 additions and 0 deletions.
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
systemd-docker (0.2.1+dfsg-1) UNRELEASED; urgency=medium

* Initial release (Closes: #764784).

-- Dmitry Smirnov <[email protected]> Tue, 03 Nov 2015 01:02:25 +1100
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
44 changes: 44 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Source: systemd-docker
Section: devel
Priority: extra
Maintainer: Debian Go Packaging Team <[email protected]>
Uploaders: Dmitry Smirnov <[email protected]>
Build-Depends: debhelper (>= 9),
dh-golang,
golang-go,
# golang-github-docker-docker-dev,
golang-github-fsouza-go-dockerclient-dev
Standards-Version: 3.9.6
Homepage: https://github.com/ibuildthecloud/systemd-docker
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-go/packages/systemd-docker.git
Vcs-Git: git://anonscm.debian.org/pkg-go/packages/systemd-docker.git
XS-Go-Import-Path: github.com/ibuildthecloud/systemd-docker

Package: systemd-docker
Architecture: any
Built-Using: ${misc:Built-Using}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: Wrapper for "docker run" to handle systemd quirks
systemd-docker This is a wrapper for docker run so that you can sanely
run Docker containers under systemd. The key thing that this wrapper
does is move the container process from the cgroups setup by Docker to
the service unit's cgroup. This handles a bunch of other quirks so
please read through documentation to get an understanding of all the
implications of running Docker under systemd.
.
Using this wrapper you can manage containers through systemctl or the
docker CLI and everything should just stay in sync. Additionally
you can leverage all the cgroup functionality of systemd and
systemd-notify. Why I wrote this? The full context is in Docker
Issue #6791 (https://github.com/docker/docker/issues/6791)
and this mailing list thread
(https://groups.google.com/d/topic/coreos-dev/wf7G6rA7Bf4/discussion).
The short of it is that systemd does not actually supervise the Docker
container but instead the Docker client. This makes systemd incapable
of reliably managing Docker containers without hitting a bunch of really
odd situations. Installation Copy systemd-docker to /opt/bin (really
anywhere you want). You can download/compile through the normal go
get github.com/ibuildthecloud/systemd-docker Quick Usage Basically, in
your unit file use systemd-docker run instead of docker run. Here's an
example unit file that runs nginx.
49 changes: 49 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: systemd-docker
Source: https://github.com/ibuildthecloud/systemd-docker
Files-Excluded:
Godeps/_workspace/src/github.com/docker/docker
Godeps/_workspace/src/github.com/fsouza/go-dockerclient

Files: *
Copyright: 2014-2015 Darren Shepherd
License: Apache-2.0

Files: debian/*
Copyright: 2015 Dmitry Smirnov <[email protected]>
License: GPL-3+

Files: debian/patches/*
Copyright: 2015 Dmitry Smirnov <[email protected]>
License: GPL-3+ or Apache-2.0
Comment: patches can be licensed under the same terms as upstream.

License: GPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
The complete text of the GNU General Public License version 3
can be found in "/usr/share/common-licenses/GPL-3".

License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".
1 change: 1 addition & 0 deletions debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README*
1 change: 1 addition & 0 deletions debian/examples
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
example/*
11 changes: 11 additions & 0 deletions debian/gbp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[buildpackage]
force-create = True
overlay = True
export-dir = ../build-area/

[dch]
id-length = 0

[import-orig]
pristine-tar = True
merge = False
18 changes: 18 additions & 0 deletions debian/patches/docker-opts-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Last-Update: 2015-11-03
Forwarded: not-needed
Author: Dmitry Smirnov <[email protected]>
Description: use "golang-github-fsouza-go-dockerclient-dev"

--- a/main.go
+++ b/main.go
@@ -14,9 +14,9 @@
"strconv"
"strings"
"time"

- "github.com/docker/docker/opts"
+ "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts"
flag "github.com/docker/docker/pkg/mflag"

dockerClient "github.com/fsouza/go-dockerclient"
)
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker-opts-path.patch
15 changes: 15 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
dh $@ --buildsystem=golang --with=golang

override_dh_clean:
dh_clean
## Remove Files-Excluded (when built from checkout or non-DFSG tarball):
$(RM) -rv `perl -0nE 'say $$1 if m{^Files\-Excluded\:\s*(.*?)(?:\n\n|Files:|Comment:)}sm;' debian/copyright`

override_dh_auto_test:
-dh_auto_test
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
7 changes: 7 additions & 0 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version=3

opts=\
repacksuffix=+dfsg,\
dversionmangle=s{\+dfsg\d*}{},\
https://github.com/ibuildthecloud/systemd-docker/releases \
.*/archive/v?(\d[-\d\.]+)\.tar\.gz

0 comments on commit 38dfe92

Please sign in to comment.