first commit
This commit is contained in:
commit
78a56d8ab7
8
Dockerfile
Normal file
8
Dockerfile
Normal 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
21
LICENSE
Normal 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
25
README.md
Normal 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
10
build
Executable 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
16
html/index.html
Normal 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
BIN
html/microbot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
BIN
html/microbot2.png
Normal file
BIN
html/microbot2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
BIN
microbot-screenshot.png
Normal file
BIN
microbot-screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 167 KiB |
4
start.sh
Executable file
4
start.sh
Executable 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
4
start_nginx.sh
Executable 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;"
|
Loading…
Reference in New Issue
Block a user