Last active
October 16, 2020 20:10
-
-
Save henkin/a82bf909106a1425bec154e4dadd0709 to your computer and use it in GitHub Desktop.
docker single script in ubuntu
This file contains hidden or 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
#!/usr/bin/env bash | |
set -x | |
chmod +x "$1" | |
docker build -t $1 -f- . <<EOF | |
FROM osexp2000/ubuntu-with-utils | |
COPY $1 ./ | |
USER root | |
ENTRYPOINT [ "bash", "$1" ] | |
EOF | |
docker run "--name=$1" "$1" | |
docker rm $1 && docker rmi "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment