### Build foglamp Ubuntu 18.04 image

```
    $ docker build --no-cache --tag foglamp:latest -f Dockerfile.ubuntu1804 .
```

Default image will be built with latest stable relase.

```
    $ docker build --tag foglamp:nightly --build-arg PKG_VERSION=nightly -f Dockerfile.ubuntu1804 .
```


 name of the image is foglamp and tag nightly, PKG_VERSION is the version of packages (latest, nightly etc.)


### Run container


```
    $ docker run -d -v ~/foglamp-data:/usr/local/foglamp/data --name foglamp -p 8081:8081 -p 1995:1995 -p 8082:80 foglamp:latest
```

	-d : run foglamp container in detached mode
	-v : maps host volume /foglamp-data to container volume /usr/local/foglamp/data
	--name : name of the container (foglamp)
	-p : map the port of host machine (8081) and container (:8081)
	foglamp : name of the image created in earlier step, with tag latest

> To attach to a running conatiner: `docker exec -it foglamp bash`

`--network host` mode makes the container use the host's network stack.

# Tag and push to registry

  $ sudo docker tag foglamp:latest 100.25.163.15:5000/foglamp:latest
  
  $ sudo docker push 100.25.163.15:5000/foglamp:latest
