# ansible on docker installation

**URL:** <https://forum.ansible.com/t/ansible-on-docker-installation/28380>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [August 21, 2018, 11:37am UTC](https://forum.ansible.com/t/ansible-on-docker-installation/28380 "2018-08-21T11:37:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbctcp](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nbctcp](https://forum.ansible.com/u/nbctcp)\
**Post date:** [August 21, 2018, 11:37am UTC](https://forum.ansible.com/t/ansible-on-docker-installation/28380/1 "2018-08-21T11:37:27Z")

</div>

Hi,

I am trying to install ansible on docker on Ubuntu Desktop 18.04LTS

PROBLEMS:

1. error when try to docker run
2. whether docker hub ansible/ansible already has ssh client/server inside it  
If doesn’t then how to install ssh inside container

What steps I miss  
tq

STEPS  
Docker

# apt-get update

# apt-get install apt-transport-https ca-certificates curl software-properties-common

# curl -fsSL [https://download.docker.com/linux/ubuntu/gpg](https://download.docker.com/linux/ubuntu/gpg) | sudo apt-key add -

Verify that you now have the key with the fingerprint9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.

# apt-key fingerprint 0EBFCD88

pub 4096R/0EBFCD88 2017-02-22  
Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88  
uid Docker Release (CE deb) [docker@docker.com](mailto:docker@docker.com)  
sub 4096R/F273FCD8 2017-02-22

# add-apt-repository “deb [arch=amd64] [https://download.docker.com/linux/ubuntu](https://download.docker.com/linux/ubuntu) $(lsb\_release -cs) edge”

# apt-get update

# apt-get install docker-ce

-add your current user to docker group  
admin2$ sudo usermod -aG docker $USER

# systemctl enable docker && systemctl start docker

Ansible

# docker pull ansible/ansible:default

# docker run --rm -it 13030821a080

Failed to determine whether /sys is a mount point: Operation not permitted  
Failed to determine whether /proc is a mount point: Operation not permitted  
Failed to determine whether /dev is a mount point: Operation not permitted  
Failed to determine whether /dev/shm is a mount point: Operation not permitted  
Failed to determine whether /run is a mount point: Operation not permitted  
Failed to determine whether /run/lock is a mount point: Operation not permitted  
Failed to determine whether /sys/fs/cgroup is a mount point: Operation not permitted  
Failed to determine whether /sys/fs/cgroup/systemd is a mount point: Operation not permitted  
[!!!] Failed to mount API filesystems, freezing.  
Freezing execution.

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [August 21, 2018, 5:01pm UTC](https://forum.ansible.com/t/ansible-on-docker-installation/28380/2 "2018-08-21T17:01:42Z")

</div>

You haven't stated what you are trying to achieve, so I'll assume you  
want to run an ansible control machine from a container.  
If this is the case, then [https://hub.docker.com/r/ansible/ansible/](https://hub.docker.com/r/ansible/ansible/)  
lists your issue:

"Images for automated testing of Ansible. They do not include Ansible  
and are not for end users."

Check out [https://docs.ansible.com/ansible/latest/installation\_guide/intro\_installation.html#installing-the-control-machine](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-the-control-machine)  
as well.

Dick
