I
I
IvanN7772019-02-19 21:08:15
Docker
IvanN777, 2019-02-19 21:08:15

Docker image as a script does not receive parameters, how to fix it?

Dockerfile

FROM ruby:2.5
RUN useradd -ms /bin/bash project
USER project
WORKDIR /home/project/app
RUN gem install mina -v '1.2.3'
ADD ./ /home/project/app

docker-compose
version: '3'
services:
    mina:
        image: ihmoroz/mina:0.0.17
        volumes:
            - "./:/home/project/app"
            - "~/.ssh:/home/project/.ssh"

When I start it everything is fine.
docker-compose run --rm mina 'ls'
But any launch of even this simple command with arguments leads to
docker-compose run --rm mina 'ls -la'
executable file not found in $PATH
I wanted something like, but I don’t understand CMD, at least what to read?
docker-compose run --rm mina 'mina init'
I wanted to make a simple script.
So it seems to start
docker run -v ${PWD}:/home/project/app -it ihmoroz/mina:0.0.16 mina init

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question