This example show us how to copy a bash script into docker and execute it while building the docker image.

Bash script

This bash file just prints Hello but you can install packages with apt so on.

ubuntu@linux:~$ nano my-bash.sh

#!/bin/bash
set -e

echo "Hello"

#docker #dockerfile

Executing an External Bash Script with Dockerfile
1.10 GEEK