Closed vill closed 10 months ago
Can you please tell your build args, such as RUBY_VERSION and DISTRO?
# compose.yaml
RUBY_VERSION: '3.2.2'
# Dockerfile
ARG RUBY_VERSION
ARG DISTRO_NAME=bullseye
FROM ruby:$RUBY_VERSION-slim-$DISTRO_NAME
Thanks! And when do you this error, how to build the image? I've haven't seen this problem in any project (all based on this Dockerfile and having the same CMD
line).
I executed these commands inside the created container:
ls -lh /usr/bin/bash
ls: cannot access '/usr/bin/bash': No such file or directory
which bash
/bin/bash
I've haven't seen this problem in any project (all based on this Dockerfile and having the same CMD line).
You won't have any problems even if you specify this value for CMD
CMD ["/usr/bin/abracadabra"]
Perhaps the problem can be seen if you run this through docker
and not compose
.
CMD
is redefined for example here:
https://github.com/evilmartians/ruby-on-whales/blob/b8c47dbee5ab46bb5e891fdb9b0f947f12d4ceed/example/.dockerdev/compose.yml#L53
Why then is/bin/bash
used here and not/usr/bin/bash
?
CMD is redefined for example here
oh, I see; thanks for the explanation; yeah, we always use compose locally.
Why then is /bin/bash used here and not /usr/bin/bash?
Wish I knew 😄 I guess it was added originally to not depend on CMD (in case it has been redefined) and make this command always work.
https://github.com/evilmartians/ruby-on-whales/blob/b8c47dbee5ab46bb5e891fdb9b0f947f12d4ceed/example/.dockerdev/Dockerfile#L83
The correct value should be: