first commit

This commit is contained in:
Adolfo Delorenzo 2021-03-29 19:50:06 -06:00
commit 78a56d8ab7
10 changed files with 88 additions and 0 deletions

8
Dockerfile Normal file
View File

@ -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

21
LICENSE Normal file
View File

@ -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.

25
README.md Normal file
View File

@ -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
```

10
build Executable file
View File

@ -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}

16
html/index.html Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<style type="text/css">
.centered
{
text-align:center;
margin-top:0px;
margin-bottom:0px;
padding:0px;
}
</style>
<body>
<p class="centered"><img src="microbot.png" alt="microbot"/></p>
<p class="centered">Container hostname: XXX</p>
</body>
</html>

BIN
html/microbot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
html/microbot2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
microbot-screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

4
start.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
hostname=`hostname -f`
sed -i "s/XXX/${hostname}/" /var/www/index.html
/bin/asmttpd /var/www

4
start_nginx.sh Executable file
View File

@ -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;"