-
Notifications
You must be signed in to change notification settings - Fork 5
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
Oleksii Tsvietnov
committed
Mar 5, 2017
1 parent
e4d8c96
commit 4189e5c
Showing
4 changed files
with
58 additions
and
5 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,10 @@ | ||
FROM alpine:edge | ||
|
||
RUN apk add --no-cache bash procps | ||
|
||
RUN wget -qP /etc/ http://vorakl.github.io/TrivialRC/trc && \ | ||
( cd /etc && wget -qO - http://vorakl.github.io/TrivialRC/trc.sha256 | sha256sum -c ) && \ | ||
chmod +x /etc/trc && \ | ||
/etc/trc --version | ||
|
||
ENTRYPOINT ["/etc/trc"] |
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,8 @@ | ||
FROM centos:latest | ||
|
||
RUN curl -sSLfo /etc/trc http://vorakl.github.io/TrivialRC/trc && \ | ||
( cd /etc && curl -sSLf http://vorakl.github.io/TrivialRC/trc.sha256 | sha256sum -c ) && \ | ||
chmod +x /etc/trc && \ | ||
/etc/trc --version | ||
|
||
ENTRYPOINT ["/etc/trc"] |
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,29 @@ | ||
# The example of building docker base images with TrivialRC as an ENTRYPOINT | ||
|
||
In this example, as base images were taken CentOS and Alpine. | ||
Basically, it shows two different approaches which are specific for each distribution. | ||
|
||
## Build | ||
|
||
Run these commands from the directory with the example | ||
|
||
```bash | ||
$ docker build -t centos-base -f Dockerfile.centos . | ||
$ docker build -t alpine-base -f Dockerfile.alpine . | ||
``` | ||
|
||
## Test | ||
|
||
Let's test that TrivialRC works as expected | ||
|
||
```bash | ||
$ docker run --rm -e RC_VERBOSE=true centos-base | ||
2017-03-05 22:31:15 trc [main/1]: The wait policy: wait_any | ||
2017-03-05 22:31:15 trc [main/1]: Trying to terminate sub-processes... | ||
2017-03-05 22:31:15 trc [main/1]: Exited (exitcode=0) | ||
|
||
$ docker run --rm -e RC_VERBOSE=true alpine-base | ||
2017-03-05 22:31:29 trc [main/1]: The wait policy: wait_any | ||
2017-03-05 22:31:29 trc [main/1]: Trying to terminate sub-processes... | ||
2017-03-05 22:31:29 trc [main/1]: Exited (exitcode=0) | ||
``` |