Enable openvswitch bash completions and configure bash prompt

This commit is contained in:
grossmj 2024-05-09 20:44:06 +07:00
parent b8ce1ce932
commit f5dfe27a7b
No known key found for this signature in database
GPG Key ID: 0A2D76AC45EA25CD

View File

@ -1,6 +1,6 @@
FROM alpine:latest
RUN apk add --no-cache --update openvswitch nano bash bash-completion
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
@ -8,6 +8,13 @@ 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/