Docker Image for Semaphore using the gcavalcante8808/ansible.
10K+
This is a gcavalcante8808/semaphore docker image with Ansible Installed. All configuration options can be defined through environment variables.
You need to provide the following information (through environment variables):
SEMAPHORE_DB_HOST: The MYSQL DB HOST. If not provided, the value 'db' is assumed;
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_MAIL_ALERT: Activate the mail support if Defined. When activated, the following vars needs be especified:
For now, semaphore doesn't seems to support TLS or authenticated SMTP Configurations.
SEMAPHORE_TELEGRAM_ALERT: Activate telegram integration if Defined. When activated, the following vars needs be especified:
SEMAPHORE_LDAP_SUPPORT: Activate telegram integration if Defined. When activated, the following vars needs be especified:
The following LDAP Mapping attributes can be configured as well:
Other optionals vars are:
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:
All previous tags are available in the hub.docker.com as well.
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 a few seconds (The MySQL takes some time to setUp for the first time). The default user and password is "semaphore" if you haven't provided one in the env vars.
For a 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
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 definition.
Author: Gabriel Abdalla Cavalcante Silva ([email protected])
Content type
Image
Digest
Size
275.3 MB
Last updated
about 8 years ago
docker pull gcavalcante8808/semaphore