January 2018
Intermediate to advanced
318 pages
7h 6m
English
The next, and also the last, example we are going to look at is a binary environment. This environment is different to the ones we have been looking at, as it does not contain a programming language as such. Instead, we will be deploying a bash script that installs and configures a Unix tool called cowsay. The code for this looks like the following and is available in the /Chapter08/whale/ folder:
#!/bin/shif ! hash cowsay 2> /dev/null; then apk update > /dev/null apk add curl perl > /dev/null curl https://raw.githubusercontent.com/docker/whalesay/master/cowsay > /bin/cowsay 2> /dev/null chmod +x /bin/cowsay mkdir -p /usr/local/share/cows/ curl https://raw.githubusercontent.com/docker/whalesay/master/docker.cow > /usr/local/share/cows/default.cow ...
Read now
Unlock full access