-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker.config
More file actions
50 lines (38 loc) · 1.05 KB
/
docker.config
File metadata and controls
50 lines (38 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
if [[ -v DEBUG ]]
then
set -x
set -o xtrace
set -v
fi
# Update these variables to suit your set-up
# Used to store symbolic links to containers built with apt-docker.
local_bin_dir=~/bin
# Used to store the repository directory
local_docker_home=~/docker
# Used to store the local repository of conainters
local_docker_repo="$(hostname)"
# Used in a Dockerfile generated by apt-docker
local_docker_maintainer="$(whoami)@$(hostname -A)"
# Used to run actual docker commands over ssh
remote_docker_host="docker.local"
remote_docker_user="docker"
remote_docker_timezone="${TZ:Etc/UTC}"
# Docker socket
remote_docker_container=docker.io/library/docker:latest
remote_docker_socket=/var/run/docker.sock
function note () {
echo "$@" | fold -s -w $(tput cols)
}
function stop () {
note "$@"
exit 1
}
function checkDir () {
if [ ! -d "$1" ]
then
stop "The directory '$1' does not exist, check your remote-docker configuration at '${BASH_SOURCE[0]}', aborting."
fi
}
checkDir "${local_bin_dir}"
checkDir "${local_docker_home}/${local_docker_repo}"