Skip to content

Commit a2a5750

Browse files
committed
Configure .bashrc with colorised 'll' alias
It is getting annoying when there is no 'll' alias and no colorised output from ls when opening a bash in the container. When developing, the occasion that a shell is run in the container are numerous. So we add the 'll' alias as a default to the root user's .bashrc.
1 parent 0d939b2 commit a2a5750

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ RUN set -eux ; \
2424
rm -f gitblit.tar.gz ; \
2525
# Remove unneeded scripts.
2626
rm -f /opt/gitblit/install-service-*.sh ; \
27-
rm -r /opt/gitblit/service-*.sh ;
27+
rm -r /opt/gitblit/service-*.sh ; \
28+
\
29+
# It is getting annoying not to have 'll' and colors when opening a bash in the container
30+
echo "export LS_OPTIONS='--color=auto'" >> /root/.bashrc ; \
31+
echo 'eval `dircolors -b`' >> /root/.bashrc ; \
32+
echo "alias ls='"'ls $LS_OPTIONS'"'" >> /root/.bashrc ; \
33+
echo "alias ll='"'ls $LS_OPTIONS -l'"'" >> /root/.bashrc ;
34+
2835

2936

3037

0 commit comments

Comments
 (0)