docker wrapper bash script template
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.dockerw.config
LICENSE
README.md
dockerw.sh
install.sh

README.md

dockerw

docker wrapper bash script template

you can use it to simplify bash commands related to docker in your project, make them shorter, more readable and avoid typing redundant information (like container name), you can also use it to store commands which you are using frequently

installation

go to the directory where you want to use docker wrapper and install it

with wget:

sh -c "$(wget https://raw.githubusercontent.com/pwittchen/dockerw/master/install.sh -O -)"

or with curl:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/pwittchen/dockerw/master/install.sh)"

then, install.sh script will copy dockerw.sh script into your current directory

usage

first, you need create .dockerw.config file in the same directory where you have dockerw.sh script and use it to configure your docker image settings

default settings look as follows:

IMAGE_NAME="user/repo"
HOST="127.0.0.1"
PORT_IN="7000"
PORT_OUT="7000"

optionally, you can add your own custom variables or customize dockerw.sh script or modify whole script as you need because it's just a template

by default you can call ./dockerw.sh script with one of the following options:

--help      shows help
--build     builds container
--run       runs container
--runbg     runs container in background
--cli       runs container with interactive cli (when possible)
--push      pushes container to docker hub
--pull      pulls container from docker hub
--stop      stops running docker container
--remove    removes container
--list      shows available docker containers
--ps        show running containers

you can always type ./dockerw.sh --help to show help