Skip to content

Commit

Permalink
Merge pull request #13 from DieterReuter/install-bash-completion-for-…
Browse files Browse the repository at this point in the history
…docker-tools

Add bash completion for Docker tools
  • Loading branch information
DieterReuter authored Oct 7, 2017
2 parents 82e0453 + 1570b24 commit 672bf6b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion builder/chroot-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,20 @@ chmod +x /etc/systemd/system/device-init.service
systemctl enable device-init.service

# install Docker Machine directly from GitHub releases
curl -sSL "https://github.com/docker/machine/releases/download/v$DOCKER_MACHINE_VERSION/docker-machine-Linux-aarch64" \
curl -sSL "https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine-Linux-aarch64" \
> /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine

# install bash completion for Docker Machine
curl -sSL "https://raw.githubusercontent.com/docker/machine/v${DOCKER_MACHINE_VERSION}/contrib/completion/bash/docker-machine.bash" -o /etc/bash_completion.d/docker-machine

# install Docker Compose via pip
curl -sSL https://bootstrap.pypa.io/get-pip.py | python
pip install docker-compose==${DOCKER_COMPOSE_VERSION}

# install bash completion for Docker Compose
curl -sSL "https://raw.githubusercontent.com/docker/compose/${DOCKER_COMPOSE_VERSION}/contrib/completion/bash/docker-compose" -o /etc/bash_completion.d/docker-compose

# # set up Docker APT repository and install docker-engine package
# #TODO: pin package version to ${DOCKER_ENGINE_VERSION}
# curl -sSL https://get.docker.com | /bin/sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@
its(:stdout) { should match /1.16.1/m }
its(:exit_status) { should eq 0 }
end

describe file('/etc/bash_completion.d/docker-compose') do
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by 'root' }
end
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@
its(:stdout) { should match /0.12.2/m }
its(:exit_status) { should eq 0 }
end

describe file('/etc/bash_completion.d/docker-machine') do
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by 'root' }
end

0 comments on commit 672bf6b

Please sign in to comment.