Public | Automated Build

Last pushed: 3 months ago
Short Description
Docker Image for Semaphore using the gcavalcante8808/ansible.
Full Description

Semaphore Container

This is a gcavalcante8808/sempahore docker image with Ansible Installed.


You need to provide the following information (through environment variables):

  • SEMAPHORE_DB_PORT: Listen port of the host. If not provided, the value '3306' is assumed;
  • SEMAPHORE_DB_USER: The User that can access the mysql. If Not provided, the value 'semaphore' is assumed;
  • SEMAPHORE_DB_PASS: The Password of the User. If not provided, the value 'semaphore' is assumed;
  • SEMAPHORE_DB: The Name of Schema created. If Not provided, the value 'semaphore' is assumed.
  • SEMAPHORE_ADMIN: user that have access to semaphore web ui. Default: semaphore;
  • SEMAPHORE_ADMIN_EMAIL: email of the user. Default: semaphore;
  • SEMAPHORE_ADMIN_NAME: Name of the user. Default: Semaphore User;
  • SEMAPHORE_ADMIN_PASSWORD: password of the user. Default: semaphore.

Questions about the image tag

Previously, the image was based in the gcavalcante8808/ansible (latest) image, but this behavious has changed; as such, all needed Dockerfile statements to install ansible are included in this image and the following statements are true for the tags of the images:

  • The semaphore_versions supported are listed in the file semaphore_versions;
  • The ansible_versions support are listed in the file ansible_versions;
  • The tags were defined using the just the semaphore_version before; now, it uses a the following format '{{ semaphore-version }}-ansible-{{ ansible-version}}" allowing to permute the versions declared in the 'semaphore_versions' and 'ansible_versions'. Eg:
    • 2.4.1-ansible- an semaphore 2.4.1 with an ansible installed.

All previous tags are available in the as well.

Using Docker Compose

Clone the repo into your machine and access the folder created. Then, use the following command:

    docker-compose up -d

Check your semaphore on localhost:8080 after some seconds (The MySQL takes some time to setUp for the first time). The default user and password is "semaphore".

Note About "Login Incorrect"

For fresh install, sometimes the application starts before the database; in these cases, the import_user script cannot setup the 'SEMAPHORE_ADMIN' account properly; an restart is sufficient to solve the race condition. You can still run the import_user script trough the following command:

docker-compose exec web /import_user

Note About "Host key Verification Failed"

Due to the use of ssh client by ansible, you'll need to fingerprint the target SSH public before the use of the semaphore or you will incur in some 'Host key verification failed.' Errors. To do that, use the following command (for each host in the inventory):

    docker exec -it <CONTAINER> sh -c 'ssh-keyscan -H <SERVER> >> ~/.ssh/known_hosts'

Where container is the id or the name of the semaphore container created and server is the target of your ansible playbooks.

If you want to disable the SSh Strict Host Checking feature (Be Carefull with Man-In-The-Middle attacks), use the statement 'host_key_checking=False' as extra_var in your Template Task or set ANSIBLE_HOST_KEY_CHECKING=False in the container creation.


Author: Gabriel Abdalla Cavalcante Silva (

Docker Pull Command