This repository has been archived by the owner on Feb 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7425470
commit e7eea7c
Showing
4 changed files
with
63 additions
and
0 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
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 @@ | ||
[Unit] | ||
Description=Nginx | ||
After=docker.service | ||
Requires=docker.service | ||
|
||
[Service] | ||
ExecStartPre=/usr/bin/docker run --rm -v /opt/bin:/opt/bin ibuildthecloud/systemd-docker | ||
ExecStart=/opt/bin/systemd-docker run --rm --name %n nginx | ||
Restart=always | ||
RestartSec=10s | ||
Type=notify | ||
NotifyAccess=all | ||
TimeoutStartSec=120 | ||
TimeoutStopSec=15 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,6 @@ | ||
FROM busybox:latest | ||
|
||
ADD systemd-docker / | ||
ADD startup.sh / | ||
RUN mkdir -p /opt/bin | ||
CMD ["/startup.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
checksum() | ||
{ | ||
md5sum $1 | awk '{print $1}' | ||
} | ||
|
||
if [ ! -e /opt/bin/systemd-docker ] || [ "$(checksum /opt/bin/systemd-docker)" != "$(checksum /systemd-docker)" ]; then | ||
echo "Installing systemd-docker to /opt/bin" | ||
cp -pf /systemd-docker /opt/bin | ||
fi |