tlas.atlas-wiki.1.4.3.source-code.Docker-Start-Guide.md Maven / Gradle / Ivy
## Introduction
The [Zero to Docker](https://github.com/Netflix-Skunkworks/zerotodocker) project tracks the Dockerfiles used to create official Netflix OSS containers on [Docker Hub](https://registry.hub.docker.com/repos/netflixoss/).
The [Atlas container](https://github.com/Netflix-Skunkworks/zerotodocker/wiki/Atlas) provides some fake in-memory data for testing the endpoints and graphing capabilities.
```
# build environment testing
docker run -it netflixoss/java:8 /bin/bash
# build command
docker build -t netflixoss/atlas $DOCKERFILE_HOME
# interactive run command
docker run \
--name atlas \
-p 7101:7101 \
netflixoss/atlas:1.4.1
# detached run command
docker run -d \
--name atlas \
-p 7101:7101 \
netflixoss/atlas:1.4.1
# view port mappings
docker port atlas
# connect interactive bash shell to a container
docker exec -it atlas bash
# explore running containers
docker ps -a
docker start $CONTAINER_NAME_OR_ID
docker stop $CONTAINER_NAME_OR_ID
docker rm $CONTAINER_NAME_OR_ID
# explore container images
docker images
docker pull $IMAGE_NAME_OR_ID
docker rmi $IMAGE_NAME_OR_ID
docker rmi -f $IMAGE_NAME_OR_ID
```
The Atlas container will run a standalone Java process on port 7101 and this will be mapped to port 0.0.0.0:7101 on the host machine running the container. Using this mapping, you can test Atlas with a curl command to one of the endpoints. See [[Graph]] and [[Tags]] for more details on endpoints.
```
curl -s http://localhost:7101/api/v1/tags
```
## Testing with Vagrant
The [Vagrant](https://www.vagrantup.com/) project leverages [Virtual Box](https://www.virtualbox.org/) and [published guest boxes](https://vagrantcloud.com/boxes/search) to automate the provisioning of virtual machines on your local workstation. You can use the following `Vagrantfile` to stand up an environment for testing the Docker container.
```
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <