Zalenium videos stored locally? - zalenium

In zalenium, As the Videos are displayed in Dashboard, my question is: are these videos stored in Zalenium docker image that we pulled ? or they are stored in local system? If they are stored in local system then how can we access them through file structure/ windows explorer?

Videos are end up being stored inside the Zalenium container, more specifically in the /home/seluser/videos directory. Therefore, if you start Zalenium by mapping a local directory to the videos one inside the container, the videos will end up in your local directory.
Example in Windows (from the Zalenium docs):
docker run --rm -ti --name zalenium -p 4444:4444 ^
-v /var/run/docker.sock:/var/run/docker.sock ^
-v /c/Users/your_user_name/temp/videos:/home/seluser/videos ^
--privileged dosel/zalenium start
-v /c/Users/your_user_name/temp/videos:/home/seluser/videos will map the local directory /c/Users/your_user_name/temp/videos in Windows to the /home/seluser/videos inside the container. So the videos will also be stored there.

Related

Find docker image files on Windows

I'm using Keycloak on docker and I have to change some files to build a custom theme in docker's image for Keycloak, but I can't find these files on my Windows system. How can I find and change docker images files on Windows?
Once an image has been built, you can't modify it. In general, you can't directly modify the files in images or containers from outside of Docker.
You can build a custom Docker image starting FROM any image you want, and then COPY files into the theme directory:
FROM jboss/keycloak
COPY my-theme/ /opt/jboss/themes/my-theme/
ENV KEYCLOAK_DEFAULT_THEME=my-theme
docker-build -t my-keycloak .
docker run -p 8080:8080 my-keycloak
Or, you can bind-mount a host directory into the container. This will allow you to directly edit the files in the host directory, and they will be reflected in the container (and vice versa), but it will not produce a reusable image that you could distribute.
docker run \
-p 8080:8080 \
-v $PWD/my-theme:/opt/jboss/keycloak/my-theme \
-e KEYCLOAK_DEFAULT_THEME=my-theme \
jboss/keycloak

Populating a volume using a container does not work in Docker on Windows

I'm following the instruction on this Docker official page under "Populate a volume using a container" in an attempt to create a new volume populated with existing files in a newly launched container. I ran the following command, expecting the existing files and folders under C:\Data on the container to be available under the volume:
docker run -it --name=test -v C:\Data dataimage/test1:version1
A new volume appears to be created successfully. However, navigating to C:\Data folder on the container shows that it is completely empty. If I run the above command without the -v option instead, then I can see the original files at the same location.
Is this a fully supported feature in Docker on Windows? If so, could someone please shed a light on what I may be doing wrong?
I am using Docker Engine version is v19.03.8. And my host OS is Windows Server 2019.
Try this:
docker run -it --name=test -v '/c/Data:/data' dataimage/test1:version1
That should sync the C:\Data folder on your windows host with the /data folder in the container. If /data isn't the folder name you want in the container, change as needed.

How to run local Docker Image

I have an image that I want to run on my local machine. I took this image from my friend and not from docker-hub or any repository. The file shared is in ".img" format.
I am able to import this image on docker but unable to run.
What I did:
Compress the image file from ".img" format to ".tar.gz" format so that the docker image can be imported. I used 7-zip tool to convert this.
From my local I imported the docker image using this new file(.tar.gz)<
Trying to run this imported image but fails.
Commands Executed:
PS C:\Users\C61464> docker import .\Desktop\regchange.tar.gz
sha256:a0008215897dd1a7db205c191edd0892f484d230d8925fd09e79d8878afa2743
PS C:\Users\C61464> docker images
REPOSITORY TAG IMAGE ID CREATED
SIZE
<none> <none> 7fdbbdcc59c4 2 minutes ago 1.05GB
PS C:\Users\C61464> docker tag 7fdbbdcc59c4 bwise:version1.0
PS C:\Users\C61464> docker images
REPOSITORY TAG IMAGE ID CREATED
SIZE
bwise version1.0 7fdbbdcc59c4 3 minutes ago 1.05GB
PS C:\Users\C61464> docker run -p 8888:80 bwise:version1.0
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: No command specified.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
I searched a lot for this error and found that for running we need to specify the path used while creating the image(In Dockerfile) but I am not sure as I am new to docker. Am I doing something wrong or I need to have the docker file to run this image?
Perhaps the Docker Image you have had no CMD or ENTRYPOINT defined when it was built, so the docker daemon doesn't know what to do with the image
Try doing
docker run -it -p 8888:80 bwise:version1.0 sh
(if it's a *nix based image). That should start an interactive shell.
You can do:
docker run -p 8888:80 bwise:version1.0 {command_you_want_to_run}
On the image when starting it.
The docker image may be broken.
Look inside. See suggestions how to in How to see docker image contents
Run this command to inspect your image
docker inspect [docker-image-name]
Inspect you will see base image and other info about that image

How to load a Docker image from a tar file

I have installed Docker for Windows. I have downloaded HDP_2.5_docker.tar from http://hortonworks.com/downloads/#sandbox which is a 10 GB file.
How can I load an image tar file? I have tried this command:
docker import HDP_2.5_docker.tar
You can use docker load
Usage: docker load [OPTIONS]
Load an image from a tar archive or STDIN
Git bash console:
docker load < HDP_2.5_docker.tar
Windows cmd:
docker load -i windowsservercore.tar
Firstly, put the tar file under your user folder: i.e: C:\Users\yourName\xxx.tar
Secondly, run the Docker load CMD:
docker load -i xxx.tar
After it is done, we could see the file is loaded as Docker images by running CMD:
docker images
you can do:
docker image import file.tar images_name:image_tag
Load the desired docker file, assuming you are in the same directory as the tar file, you can use -
$ docker load -i filename.tar
On successful import, you will see a success message along with the image ID
Check in the docker images for the image ID that you just received:
docker images
You will see the docker loaded successfully in the docker images list. However, there is one thing worth mentioning in case you might get confused; the date reflected in the command output might reflect the date when docker is created. Assuming, docker got created 5 days ago then the same will be shown in the output. Better way to confirm if your docker is loaded or not is to check for the image ID or repo and tag name (if you know).
You can finally run the docker using the command -
$ docker run -it image-ID

What is location of images pulled from Docker Hub via Docker for Mac

*Note: I know about this question, however, it is related to Docker Toolbox and not to Docker Desktop for Mac and it seems that each tool uses different location for storing Docker images locally
Where can I find a docker images that have been pulled from Docker Hub by means of Docker desktop for Mac?
I tried to verify that Docker is running by the following command.
docker run hello-world
As a result the Docker daemon pulled the "hello-world" image from the Docker Hub but I am not able to find it.
It should be in
$HOME/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2
with Docker.qcow2 being the filesystem for the "vm" that Docker for Mac runs in.
See issue 23437.
That means removing the images (thread 15194: docker images -q |xargs docker rmi --force) won't decrease the space occupied by Docker.qcow2 (and the disk space on the disk).
To the point you start seeing aliases like this one:
shrink-qcow2 () {
mv ${1} ${1}.BACKUP && qemu-img convert -O qcow2 ${1}.BACKUP ${1}
}
On a Mac, you should find them here:
~/Library/Containers/com.docker.docker/Data/

Resources