File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,16 @@ mod-outdated: ## check outdated dependencies
86
86
authors : # # generate AUTHORS file from git history
87
87
scripts/docs/generate-authors.sh
88
88
89
+ .PHONY : completion
90
+ completion : binary
91
+ completion : /etc/bash_completion.d/docker
92
+ completion : # # generate and install the completion scripts
93
+
94
+ .PHONY : /etc/bash_completion.d/docker
95
+ /etc/bash_completion.d/docker : # # generate and install the bash-completion script
96
+ mkdir -p /etc/bash_completion.d
97
+ docker completion bash > /etc/bash_completion.d/docker
98
+
89
99
.PHONY : manpages
90
100
manpages : # # generate man pages from go source and markdown
91
101
scripts/docs/generate-man.sh
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
35
35
FROM golang AS dev
36
36
RUN apk add --no-cache \
37
37
bash \
38
+ bash-completion \
38
39
build-base \
39
40
ca-certificates \
40
41
coreutils \
@@ -44,7 +45,8 @@ RUN apk add --no-cache \
44
45
nano
45
46
46
47
RUN echo -e "\nYou are now in a development container. Run '\e\033[1mmake help\e\033[0m' to learn about\navailable make targets.\n" > /etc/motd \
47
- && echo -e "cat /etc/motd\nPS1=\"\e[0;32m\u@docker-cli-dev\\$ \e[0m\"" >> /root/.bashrc
48
+ && echo -e "cat /etc/motd\nPS1=\"\e[0;32m\u@docker-cli-dev\\$ \e[0m\"" >> /root/.bashrc \
49
+ && echo -e "source /etc/bash/bash_completion.sh" >> /root/.bashrc
48
50
CMD bash
49
51
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
50
52
ENV PATH=$PATH:/go/src/github.com/docker/cli/build
You can’t perform that action at this time.
0 commit comments