├── Dockerfile ├── LICENSE ├── README.md ├── build ├── html ├── index.html ├── microbot.png └── microbot2.png ├── microbot-screenshot.png ├── start.sh └── start_nginx.sh /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:alpine 2 | 3 | # Bring in the microbot 4 | COPY html /usr/share/nginx/html 5 | COPY start_nginx.sh / 6 | 7 | # Run nginx 8 | CMD /start_nginx.sh 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Patrick O'Connor 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | docker-microbot 2 | ====================== 3 | 4 | ## Purpose 5 | A 6.5MB Docker image running 6 | - [Alpine Linux](https://github.com/gliderlabs/docker-alpine) 7 | - [Nginx](http://nginx.org/) 8 | - Microbot image/unique html content 9 | 10 | Intended use is to demo docker orchestration 11 | - Docker 12 | - Mesos 13 | - Marathon 14 | - Kubernetes 15 | 16 | ## Usage 17 | ### From your machine 18 | ``` 19 | docker run -d -p "8080:80" dontrebootme/microbot 20 | ``` 21 | 22 | ## Build 23 | ``` 24 | ➜ ./build 25 | ``` 26 | -------------------------------------------------------------------------------- /build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | imagename="rothgar/microbot" 3 | if [ $# -eq 0 ];then 4 | tagver="latest" 5 | else 6 | tagver="${1}" 7 | fi 8 | echo "Now building: ${imagename}:${tagver}" 9 | docker build --rm=true --no-cache=true --pull=true -t ${imagename}:${tagver} . 10 | docker push ${imagename}:${tagver} 11 | -------------------------------------------------------------------------------- /html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 |
13 |Container hostname: XXX
15 | 16 | 17 | -------------------------------------------------------------------------------- /html/microbot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dontrebootme/docker-microbot/6ecffcb59a7acd725891be110c5ce4c4b8d43556/html/microbot.png -------------------------------------------------------------------------------- /html/microbot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dontrebootme/docker-microbot/6ecffcb59a7acd725891be110c5ce4c4b8d43556/html/microbot2.png -------------------------------------------------------------------------------- /microbot-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dontrebootme/docker-microbot/6ecffcb59a7acd725891be110c5ce4c4b8d43556/microbot-screenshot.png -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | hostname=`hostname -f` 3 | sed -i "s/XXX/${hostname}/" /var/www/index.html 4 | /bin/asmttpd /var/www 5 | -------------------------------------------------------------------------------- /start_nginx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | hostname=`hostname -f` 3 | sed -i "s/XXX/${hostname}/" /usr/share/nginx/html/index.html 4 | /usr/sbin/nginx -g "daemon off;" 5 | --------------------------------------------------------------------------------