Hector Esteban
Hector Esteban

Reputation: 1111

See image generated in docker

I created a Docker like:

FROM rikorose/gcc-cmake

RUN git clone https://github.com/hect1995/UBIMET_Challenge.git

WORKDIR /UBIMET_Challenge

RUN mkdir build

WORKDIR build

#RUN apt-get update && apt-get -y install cmake=3.13.1-1ubuntu3 protobuf-compiler

RUN cmake ..

RUN make

Afterwards I do:

docker build --tag trial .
docker run -t -i trial /bin/bash

Then I run an executable that saves a .png file inside the container.

How can I visualize the image?

Upvotes: 0

Views: 63

Answers (2)

Taybur Rahman
Taybur Rahman

Reputation: 1457

Please mount a localhost volume(directory) with container volume(directory) in where you are saving your images. now all of your images saved in container directory will be available in host or localhost mount directory. From there you can visualize or download to another machine.

Please follow this

docker run  --rm -d -v host_volume_or-directory:container_volume_direcotory trial
docker exec -it container_name /bin/bash 

Upvotes: 0

Riccardo Manzan
Riccardo Manzan

Reputation: 823

You can execute something inside the container.

To see all containers you can run docker ps --all.

To execute something inside container you can run docker exec <container id> command.

Otherwise you can copy files from container to host, with docker cp <container id>:/file-path ~/target/file-path

Upvotes: 1

Related Questions