Using ssh-agent with docker on macOS

Since version 2.2.0.0, docker for macOS allows users to access the host’s SSH agent inside containers. Here’s an example command that let’s you do it: docker run –rm -it \ -v /run/host-services/ssh-auth.sock:/ssh-agent \ -e SSH_AUTH_SOCK=”/ssh-agent” \ my_image Note that you have to mount the specific path (/run/host-services/ssh-auth.sock) instead of the path contained in $SSH_AUTH_SOCK environment … Read more

Verify the version of ubuntu running in a Docker container

The uname command is pulling specs from the kernel running on the host. If I enter a Ubuntu container on my Debian host, the uname will answer with a Debian build of the kernel. To know the version of Ubuntu you are running, do a $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION=”Ubuntu 16.04.3 LTS” It’s … Read more

Docker daemon config file on boot2docker / docker-machine / Docker Toolbox

Inside boot2docker (boot2docker ssh) / docker-machine (docker-machine ssh default) , open or create the file /var/lib/boot2docker/profile and add the following line: EXTRA_ARGS=”–dns 192.168.1.145″ Also works for: EXTRA_ARGS=”–insecure-registry myinternaldocker” After the change you need to restart the docker daemon: sudo /etc/init.d/docker restart Or leave boot2docker / docker-machine and restart the entire virtual machine: boot2docker restart # … Read more

Accessing host machine as localhost from a Docker container that’s also inside a boot2docker vm

Thanks to palimpestor’s answer I figured it out: Instead of –net=”host”, use –add-host=”localhost:10.0.2.2″ Indeed: 10.0.2.2 is the default gateway defined for the guest network interface in NAT mode (reference). Read: it’s your host, seen from boot2docker. –add-host… is adding localhost 10.0.2.2 in /etc/hosts (reference) Note: you need to have set up a NAT adapter in … Read more

How to deploy Dockerfile and application files to boot2docker

Not sure if it helps under windows. But for Mac see: boot2docker together with VirtualBox Guest Additions How to mount /Users into boot2docker https://medium.com/boot2docker-lightweight-linux-for-docker/boot2docker-together-with-virtualbox-guest-additions-da1e3ab2465c tl;dr Build your own custom boot2docker.iso with VirtualBox Guest Additions (see link) or download http://static.dockerfiles.io/boot2docker-v1.0.1-virtualbox-guest-additions-v4.3.12.iso and save it to ~/.boot2docker/boot2docker.iso.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)