From 5dd5c422829ceac252d5c13d0022acff40f76185 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 1 Sep 2021 22:51:08 +0200 Subject: [PATCH 1/1] fortune:1.0.0 - Docker-Image with Fortune --- .dockerignore | 2 ++ .gitignore | 1 + Dockerfile | 7 +++++++ README.sh | 15 +++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 .dockerignore create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100755 README.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c6fd883 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +* +!fortune-simpsons-chalkboard/chalkboard* diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..efb0543 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +fortune-simpsons-chalkboard* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fd3d7d1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu:21.04 + +RUN apt-get update && apt-get install -y fortune fortunes-mario fortunes-off fortunes-spam fortunes-ubuntu-server fortunes-debian-hints fortunes-de fortune-anarchism httpie && apt-get clean && rm -rvf /var/lib/apt/lists/* +RUN date > builddate.txt +COPY fortune-simpsons-chalkboard/chalkboard* /usr/share/games/fortunes/ + +CMD ["/usr/games/fortune"] diff --git a/README.sh b/README.sh new file mode 100755 index 0000000..dab0030 --- /dev/null +++ b/README.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ "$1" = "" ] +then + FORTUNE=juplo/fortune +else + FORTUNE="$1" +fi +echo "Downloading Chalkboard-Quotes from Bart Simpson..." +curl https://www.splitbrain.org/_media/projects/fortunes/fortune-simpsons-chalkboard.tgz > fortune-simpsons-chalkboard.tgz +echo "Unpacking Chalkboard-Quotes..." +tar -xzvf fortune-simpsons-chalkboard.tgz + +echo "Building the image $FORTUNE" +docker build -t $FORTUNE . -- 2.20.1