-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #882 from GNS3/feature/openvswitch-bash-completion
Open VSwitch appliance bash completion
- Loading branch information
Showing
2 changed files
with
23 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
FROM alpine:latest | ||
|
||
RUN apk add --update openvswitch nano && rm -rf /var/cache/apk/* | ||
RUN apk add --no-cache openvswitch nano bash bash-completion | ||
|
||
# Make bash the default shell | ||
RUN sed -i s,/bin/ash,/bin/bash, /etc/passwd | ||
|
||
# Enable bash completion | ||
RUN echo -e "source /etc/profile.d/bash_completion.sh" >> ~/.bashrc | ||
|
||
# Enable openvswitch bash completion | ||
RUN echo -e "source /usr/share/bash-completion/completions/ovs-vsctl-bashcomp.bash" >> ~/.bashrc | ||
RUN echo -e "source /usr/share/bash-completion/completions/ovs-appctl-bashcomp.bash" >> ~/.bashrc | ||
|
||
# Configure the prompt | ||
RUN echo -e "PS1='\h:\w\$ '" >> ~/.bashrc | ||
|
||
RUN mkdir /var/run/openvswitch | ||
|
||
VOLUME /etc/openvswitch/ | ||
|
||
ADD boot.sh /bin/boot.sh | ||
|
||
CMD /bin/sh /bin/boot.sh | ||
CMD /bin/bash /bin/boot.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters