Explorar o código

Merge pull request #11901 from albers/dockerfile-bash-completion

Enable bash completion in build environment
Jessie Frazelle %!s(int64=10) %!d(string=hai) anos
pai
achega
f3a048516e
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Dockerfile

+ 4 - 0
Dockerfile

@@ -31,6 +31,7 @@ RUN apt-get update && apt-get install -y \
 	apparmor \
 	apparmor \
 	aufs-tools \
 	aufs-tools \
 	automake \
 	automake \
+	bash-completion \
 	btrfs-tools \
 	btrfs-tools \
 	build-essential \
 	build-essential \
 	curl \
 	curl \
@@ -142,6 +143,9 @@ ENV DOCKER_BUILDTAGS apparmor selinux btrfs_noversion
 # Let us use a .bashrc file
 # Let us use a .bashrc file
 RUN ln -sfv $PWD/.bashrc ~/.bashrc
 RUN ln -sfv $PWD/.bashrc ~/.bashrc
 
 
+# Register Docker's bash completion.
+RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker
+
 # Get useful and necessary Hub images so we can "docker load" locally instead of pulling
 # Get useful and necessary Hub images so we can "docker load" locally instead of pulling
 COPY contrib/download-frozen-image.sh /go/src/github.com/docker/docker/contrib/
 COPY contrib/download-frozen-image.sh /go/src/github.com/docker/docker/contrib/
 RUN ./contrib/download-frozen-image.sh /docker-frozen-images \
 RUN ./contrib/download-frozen-image.sh /docker-frozen-images \