Skip to content

Commit

Permalink
Rpi docker image (#64)
Browse files Browse the repository at this point in the history
* build arm docker image

* point to correct dockerfile for rpi build

* forgot readme docs

* dockerfile no
\n for consistency
  • Loading branch information
circa10a authored Dec 19, 2018
1 parent 1d1cf3b commit b970ce6
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tests/
*.sh
.coveragerc
.travis.yml
doc/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ FROM python:3.6-alpine
COPY . /app
WORKDIR /app
RUN pip install --no-cache-dir .
ENTRYPOINT ["ouroboros"]
ENTRYPOINT ["ouroboros"]
6 changes: 6 additions & 0 deletions Dockerfile.rpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM resin/raspberry-pi-alpine-python:3.6-slim-20181218

COPY . /app
WORKDIR /app
RUN pip install --no-cache-dir .
ENTRYPOINT ["ouroboros"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ A python-based alternative to [watchtower](https://github.com/v2tec/watchtower)
## Table of Contents

- [Overview](#overview)
- [Changelog](doc/CHANGELOG.md)
- [Usage](#usage)
- [Docker](#docker)
- [Pip](#pip)
Expand Down Expand Up @@ -48,12 +49,20 @@ Ouroboros will monitor all running docker containers or those you specify and up

Ouroboros is deployed via docker image like so:

**x86**
```bash
docker run -d --name ouroboros \
-v /var/run/docker.sock:/var/run/docker.sock \
circa10a/ouroboros
```

**ARM/RPI**
```bash
docker run -d --name ouroboros \
-v /var/run/docker.sock:/var/run/docker.sock \
circa10a/ouroboros:latest-rpi
```

or via `docker-compose`:

```yaml
Expand Down
15 changes: 13 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@ PROJECT='ouroboros'
NAMESPACE=${USER}/${PROJECT}
# Auth
echo $docker_password | docker login -u=$USER --password-stdin
# Latest

# Latest x86
docker build -t $NAMESPACE:latest .
docker push $NAMESPACE:latest
# Versioned
# Versioned x86
docker tag $NAMESPACE:latest $NAMESPACE:$VERSION
docker push $NAMESPACE:$VERSION

# prepare qemu for ARM builds
docker run --rm --privileged multiarch/qemu-user-static:register --reset

# Latest ARM
docker build -t $NAMESPACE:latest-rpi -f ./Dockerfile.rpi
docker push $NAMESPACE:latest-rpi
# Versioned ARM
docker tag $NAMESPACE:latest-rpi $NAMESPACE:$VERSION-rpi
docker push $NAMESPACE:$VERSION-rpi

# Git tags
git remote set-url origin https://$USER:$github_api_key@github.com/$USER/$PROJECT.git
git tag $VERSION
Expand Down
6 changes: 6 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog

## 0.3.4

Features:
- ARM/Rpi Docker image
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ def read_reqs(requirements):

setup(
name='ouroboros-cli',
version='0.3.3',
version='0.3.4',
description='Automatically update running docker containers',
long_description=readme(),
long_description_content_type='text/markdown',
url='https://github.com/circa10a/ouroboros',
license='MIT',
classifiers=['Programming Language :: Python'],
packages=find_packages(exclude=['tests']),
packages=find_packages(exclude=['doc', 'tests']),
scripts=['ouroboros/ouroboros'],
install_requires=read_reqs(requirements='./requirements.txt'),
tests_require=read_reqs(requirements='./requirements-dev.txt'),
Expand Down

0 comments on commit b970ce6

Please sign in to comment.