Docker exec linux terminal create alias
问题 I have a running and detached container. I want to create a command alias there before attaching to that container. When I am attached to the container and I type: alias bar='foo' an alias is created, and might be checked by: alias command. but if I want to do the same by docker exec command ie this way docker exec -it <container-name> /bin/bash -c "alias bar='foo'" it does not work, probably because when I'm attached to the container and type into its terminal /bin/bash -c "alias bar='foo'"