commit 78a56d8ab713bffe25b43622900415badd1f008c Author: Adolfo Delorenzo Date: Mon Mar 29 19:50:06 2021 -0600 first commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6a024c8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM nginx:alpine + +# Bring in the microbot +COPY html /usr/share/nginx/html +COPY start_nginx.sh / + +# Run nginx +CMD /start_nginx.sh diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..87a9357 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Patrick O'Connor + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d12dadf --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +docker-microbot +====================== + +## Purpose +A 6.5MB Docker image running +- [Alpine Linux](https://github.com/gliderlabs/docker-alpine) +- [Nginx](http://nginx.org/) +- Microbot image/unique html content + +Intended use is to demo docker orchestration +- Docker +- Mesos +- Marathon +- Kubernetes + +## Usage +### From your machine +``` +docker run -d -p "8080:80" dontrebootme/microbot +``` + +## Build +``` +➜ ./build +``` diff --git a/build b/build new file mode 100755 index 0000000..d2fdaf7 --- /dev/null +++ b/build @@ -0,0 +1,10 @@ +#!/bin/bash +imagename="rothgar/microbot" +if [ $# -eq 0 ];then + tagver="latest" +else + tagver="${1}" +fi +echo "Now building: ${imagename}:${tagver}" +docker build --rm=true --no-cache=true --pull=true -t ${imagename}:${tagver} . +docker push ${imagename}:${tagver} diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..4e788cb --- /dev/null +++ b/html/index.html @@ -0,0 +1,16 @@ + + + + +

microbot

+

Container hostname: XXX

+ + diff --git a/html/microbot.png b/html/microbot.png new file mode 100644 index 0000000..0d4072f Binary files /dev/null and b/html/microbot.png differ diff --git a/html/microbot2.png b/html/microbot2.png new file mode 100644 index 0000000..0d4072f Binary files /dev/null and b/html/microbot2.png differ diff --git a/microbot-screenshot.png b/microbot-screenshot.png new file mode 100644 index 0000000..3b131b0 Binary files /dev/null and b/microbot-screenshot.png differ diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..13af9cd --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +#!/bin/sh +hostname=`hostname -f` +sed -i "s/XXX/${hostname}/" /var/www/index.html +/bin/asmttpd /var/www diff --git a/start_nginx.sh b/start_nginx.sh new file mode 100755 index 0000000..794a890 --- /dev/null +++ b/start_nginx.sh @@ -0,0 +1,4 @@ +#!/bin/sh +hostname=`hostname -f` +sed -i "s/XXX/${hostname}/" /usr/share/nginx/html/index.html +/usr/sbin/nginx -g "daemon off;"