Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you shell into an Alpine/git container?

How do you shell into this image?

https://hub.docker.com/r/alpine/git

I tried:

docker pull alpine/git
docker run -it --rm alpine/git /bin/sh

but get

git: '/bin/sh' is not a git command. See 'git --help'.
like image 832
Snowcrash Avatar asked Nov 19 '25 00:11

Snowcrash


1 Answers

You have to override the entry point (which is git). Otherwise, command line arguments are interpreted as arguments to git.

docker run -it --rm --entrypoint /bin/sh alpine/git
like image 199
chepner Avatar answered Nov 20 '25 15:11

chepner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!