Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a pulled images - docker

Tags:

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?

like image 312
Bella Avatar asked Jun 02 '19 08:06

Bella


People also ask

Where is the docker image after pull?

The storage location of Docker images and containers Ubuntu: /var/lib/docker/ Fedora: /var/lib/docker/ Debian: /var/lib/docker/ Windows: C:\ProgramData\DockerDesktop.

How do I execute a docker image?

Follow these steps: Use docker ps to get the name of the existing container. Use the command docker exec -it <container name> /bin/bash to get a bash shell in the container. Or directly use docker exec -it <container name> <command> to execute whatever command you specify in the container.


1 Answers

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/

like image 60
Sree Avatar answered Oct 18 '22 21:10

Sree