I'm trying to run a pulled image without any success. I pulled an image from AWS using the Image URI.
when I run docker images I can see my pulled image:
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine 3.9 055936d39205 3 weeks ago 5.53MB
24325.dkr.ecr.us-east-1.amazonaws.com/lm/rd/tools dab-1.1.0slim f994713b61cb 3 weeks ago 110MB
ubuntu 16.04 a3551444fc85 5 weeks ago 119MB
anapsix/alpine-java 8 745575fbfe52 3 months ago 126MB
I'm new at dockers, but from what I understand after pulling no need to build it, just run it but when I tried to run it like so: docker run 24325.dkr.ecr.us-east-1.amazonaws.com/lm/rd/tools I get the below message:
Unable to find image '24325.dkr.ecr.us-east-1.amazonaws.com/lm/rd/tools:latest' locally
docker: Error response from daemon: pull access denied for 24325.dkr.ecr.us-east-1.amazonaws.com/lm/rd/tools, repository does not exist or may require 'docker login'.
So I tried to build it like so: docker build -t 24325.dkr.ecr.us-east-1.amazonaws.com/lm/rd/tools
and got the message:
"docker build" requires exactly 1 argument.
See 'docker build --help'.
What is the problem? How can I run a pulled image from AWS?
There isnt any image with tag "latest" Try running using the tag "dab-1.1.0slim"
docker run 24325.dkr.ecr.us-east-1.amazonaws.com/lm/rd/tools:dab-1.1.0slim
Or else you could run the docker image using image id
docker run -i -t f994713b61cb
for more info on docker run command check out https://docs.docker.com/engine/reference/commandline/run/
Try to run the image by docker image id
When building the image you need to add . at the end of your command as for an example
docker build -t 24325.dkr.ecr.us-east-1.amazonaws.com/lm/rd/tools . and you need to have the Dockerfile (Assume you have).
You can use simple command
docker run -d -p [PORT_ON_YOUR_BROWSER]:[PORT_ON_CONTAINER] <Image ID>
docker run -d -p 8080:80 <Image ID>