Docker Community Forums

Share and learn in the Docker community.

Docker and alias

docker

(Glassboxdigital) #1

I wonder if there is any option to add “alias ll=‘ls -l’ into the container

Meaning when i do docker exec -it [container_name] bash ===>devopwant to be able to do “ll”

It’s possible ?

Please advise

Thanks for your help

.Yossi


(Martin Terp) #2

Hi :slight_smile:

You would need to build your own image by putting something like:

RUN echo 'alias ll="ls -l"' >> ~/.bashrc

in your Dockerfile


(Glassboxdigital) #3

Thanks a-lot - it’s working !