-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from arnested/deb
Build deb package
- Loading branch information
Showing
10 changed files
with
107 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,28 @@ release: | |
# If set to true, will mark the release as not ready for production. | ||
# Default is false. | ||
prerelease: auto | ||
|
||
nfpms: | ||
- | ||
vendor: Arne Jørgensen | ||
maintainer: Arne Jørgensen <[email protected]> | ||
description: Local Docker Development DNS | ||
license: MIT | ||
formats: | ||
- deb | ||
dependencies: | ||
- docker.io | ||
- libsystemd0 | ||
bindir: /usr/libexec | ||
contents: | ||
- src: ldddns.service | ||
dst: /lib/systemd/system/ldddns.service | ||
type: config | ||
|
||
- src: ldddns.env | ||
dst: /etc/default/ldddns | ||
type: config | ||
scripts: | ||
postinstall: "scripts/postinstall.sh" | ||
preremove: "scripts/preremove.sh" | ||
postremove: "scripts/postremove.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DOCKER_API_VERSION=1.40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[Unit] | ||
Description=Local Docker Development DNS | ||
BindTo=docker.service | ||
After=docker.service | ||
|
||
[Service] | ||
Type=notify | ||
EnvironmentFile=-/etc/default/ldddns | ||
ExecStart=/usr/libexec/ldddns | ||
SuccessExitStatus=15 | ||
Restart=on-failure | ||
DynamicUser=yes | ||
SupplementaryGroups=docker | ||
CapabilityBoundingSet= | ||
DevicePolicy=closed | ||
IPAddressDeny=any | ||
LockPersonality=yes | ||
MemoryDenyWriteExecute=yes | ||
NoNewPrivileges=yes | ||
PrivateDevices=yes | ||
PrivateNetwork=yes | ||
PrivateUsers=yes | ||
ProtectClock=yes | ||
ProtectControlGroups=yes | ||
ProtectHome=yes | ||
ProtectHostname=yes | ||
ProtectKernelLogs=yes | ||
ProtectKernelModules=yes | ||
ProtectKernelTunables=yes | ||
RestrictAddressFamilies=AF_UNIX | ||
RestrictNamespaces=yes | ||
RestrictRealtime=yes | ||
SystemCallArchitectures=native | ||
SystemCallErrorNumber=EPERM | ||
SystemCallFilter=@system-service | ||
UMask=0777 | ||
|
||
[Install] | ||
WantedBy=docker.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
docker_version=$(/usr/bin/docker version --format '{{ .Server.APIVersion }}') | ||
|
||
/usr/bin/sed -i "s/\(DOCKER_API_VERSION=\).*/\1${docker_version}/" /etc/default/ldddns | ||
|
||
/bin/systemctl daemon-reload | ||
|
||
if /bin/systemctl is-active --quiet ldddns.service; then | ||
/bin/systemctl restart ldddns.service | ||
fi | ||
|
||
if ! /bin/systemctl is-enabled --quiet ldddns.service; then | ||
/bin/systemctl enable --now ldddns.service; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
/bin/systemctl daemon-reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if /bin/systemctl is-active --quiet ldddns.service; then | ||
/bin/systemctl stop ldddns.service | ||
fi | ||
|
||
if /bin/systemctl is-enabled --quiet ldddns.service; then | ||
/bin/systemctl disable --now ldddns.service; | ||
fi |
This file was deleted.
Oops, something went wrong.