S
S
Sergey Beloventsev2019-12-12 21:50:19
Docker
Sergey Beloventsev, 2019-12-12 21:50:19

Why does an error occur when working with an image?

I'm trying to deal with docker
so I created a Dockerfile

FROM ubuntu

MAINTAINER DKA DEVELOP <[email protected]>

RUN apt-get update && apt-get install -y cowsay  && ln -s /usr/game/cowsay /usr/bin/cowsay

ENTRYPOINT ["cowsay"]

like this, I try to install the container,
docker build -t sergalas/test-container
I try to start the container ,
docker run sergalas/test-container "test"
I get the following error
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"cowsay\": executable file not found in $PATH": unknown.
ERRO[0001] error waiting for container: context canceled

where is the mistake

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-12-12
@Sergalas

Look, you are in your project folder, where the Dockerfile is. The command must end with a dot.
docker build -t sergalas/test-container .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question