Skip to content

This is a docker instance for gfb's api and documentation (with swagger ui)

License

Notifications You must be signed in to change notification settings

globalfoodbook/swag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Swagger UI running inside docker.

A Docker container for setting up Swagger UI. This server provides documentation for the API.

Swagger is an open-source documentation tool.

This container best suites development purposes.

This is a sample Swagger docker container used to test GFB's installation on http://www.globalfoodbook.com

To build this swag server run the following command:

$ docker pull globalfoodbook/swag

This will run on a internal default port of 80.

To run the server on the host machine, run the following command:

$ docker run --name=swag --detach=true swag

NB:

Before pushing to docker hub

Login

$ docker login

Build

$ cd /to/docker/directory/path/
$ docker build -t <username>/<repo>:latest .

Push to docker hub

$ docker push <username>/<repo>:latest

IP=docker inspect swagger | grep -w "IPAddress" | awk '{ print $2 }' | head -n 1 | cut -d "," -f1 | sed "s/\"//g" HOST_IP=/sbin/ifconfig eth1 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'

DOCKER_HOST_IP=awk 'NR==1 {print $1}' /etc/hosts # from inside a docker container

About

This is a docker instance for gfb's api and documentation (with swagger ui)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages