You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ASYD/ASYD_Docker/docker-03/debcp_v1/build.sh

17 lines
403 B

#!/bin/bash
# get the container name from the current working directory
IMG_NAME=$(basename $(pwd))
docker build -t $IMG_NAME .
echo "In the image do:"
echo " cd /tmp"
echo " ls -l"
echo " cat greetings.txt"
docker run --rm -it $IMG_NAME
# can also string together commands to execute at container-start
# docker run --rm -it $IMG_NAME sh -c "cat /tmp/greetings.txt; ls -l /tmp/greetings.txt"