Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

docker-machine installation and basics

Leer en espanol
docker-machine installation and basics

Table of contents

Basic docker-m commands === Can be used to create hosts docker enata center our local teams, in company networks, in data centers or in cloud providers such as DonDocker.com or AWS.

The basic commands docker-machine are start, inspection, stop and restart to manage the host, upgrade to update the daemon and client docker and configure the client to connect to your host.

Facility

Bash
curl -L https://github.com/docker/machine/releases/download/v0.12.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine &&

chmod +x /tmp/docker-machine &&

sudo cp /tmp/docker-machine /usr/local/bin/docker-machine

Basic commands:

See the version

text
docker-machine –version

Create a virtual machine using virtualbox

text
docker-machine create –driver virtualbox DOCKER01

List virtual machines

text
docker-machine ls

Access docker

text
docker-machine env DOCKER01

eval «$(docker-machine env DOCKER01)»

Using the unset command we can reset the configuration (we remove the exported environment variables)

text
eval «$(docker-machine env –unset)»

Start, stop, ssh or delete a DOCKER

text
docker-machine start DOCKER01

docker-machine ssh DOCKER01

docker-machine stop DOCKER01

docker-machine rm DOCKER01

Get the IP address of a DOCKER

text
docker-machine ip default

Run a web server

text
docker-machine run -d -p 8080:80 nginx

All the best

:wq!

Comments