The easiest way to run the image is to use Docker Compose. As the AppTester image has some dependencies (mainly a MongoDB database), a docker-compose file can help in defining the relationship between the components.
Prepare your environment
To be able to run AppTester on you own machine or server you need the following:
- Access to the latest You-Get AppTester Docker image: see previous chapter for instructions.
- A docker-compose.yml file that defines how the image will run on your machine: a sample file is provided by You-Get.
- An environment.env file that holds the environment variables that are applicable to your AppTester instance: a sample is provided by You-Get.
Place the docker-compose.yml and the .env file in the same directory on the machine.
Pull the image
To get the image from Docker Hub and store it locally run the following commands from the command line of the host machine where you want to run AppTester:
Login to Docker Hub
docker login -u <username> -p <password>
Using your Docker Hub credentials with access to the youget/apptester repository.
More info about docker login can be found here: https://docs.docker.com/engine/reference/commandline/login/
Pull the image
docker pull youget/apptester
This will pull the latest version of AppTester and store it locally.
Logout
docker logout
Now you have downloaded the latest AppTester image to your machine, ready to be used by Docker Compose.
Startup the containers
The docker-compose up command will check the docker-compose.yml file and evaluate the ‘image:’ tag to identify the base image to use. It will then check if this image can be found locally and if not, it will pull it from Docker Hub.
From the directory containing the docker-compose.yml file, run the following command:
docker-compose -f docker-compose.yml up -d app
where ‘app’ is the name of the AppTester service as described in the docker-compose.yml file:
version: "3.7"
services:
app:
container_name:
apptester
restart: always
image: youget/apptester