V
V
Vadim kyklaed2019-07-09 15:40:19
Docker
Vadim kyklaed, 2019-07-09 15:40:19

How to pass parameters when running a docker image?

Hello, help me figure it out, I have a docker file

FROM ubuntu:latest
MAINTAINER vadim
ENTRYPOINT ["pytest","-s -v", "/test.py"]
RUN apt-get update && apt-get install -y\
    git \
    python3-pip \
    && pip3 install pytest \
    && pip3 install paramiko
RUN git clone https://github.com/admen/super.git
CMD ["--host=192.168.45.113", "--port=2222", "--user admen", "--password=qwerty"]

i need to pass named parameters to pytest call in entrypoint in cmd
i pass default parameters , in entrypoint i split string into 3 parts pytest itself, keys , and path to required script, is this correct ? because it crashes with the error
docker run image --host=192.168.45.113" --port=2222 -user=admen --password=qwerty
this is how I run it, how to do it right? what did I do wrong?

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