Commit caff5009 authored by Lukas Nemec's avatar Lukas Nemec

Merge branch 'docker-image' into 'master'

Add Dockerfile

See merge request !8
parents 0167f60c 9391d261
__pycache__
*.pyc
*.pyo
*.cache
.eggs
haas_proxy.egg-info
/build
/dist
/release
haas.log
haas.pid
Dockerfile*
pylintrc
README.md
CHANGELOG.txt
Makefile
test_haas_proxy.py
.gitignore
.gitlab-ci.yml
#IDEs
.vscode
.idea
......@@ -2,6 +2,9 @@
image: debian:8
variables:
DOCKER_DRIVER: overlay2
before_script:
- apt-get --quiet update
- apt-get install -y make
......@@ -32,3 +35,15 @@ build:
- ./*.deb
- ./*.rpm
- ./*.tar
build-docker:
image: docker:latest
services:
- docker:dind
stage: build
tags:
- dind
before_script:
- ''
script:
- docker build .
FROM alpine:3.5
ADD . /proxy
RUN apk add --no-cache \
gcc \
musl-dev \
python3-dev \
py3-pip \
py3-cffi \
py3-cryptography \
ca-certificates \
sshpass \
openssh
RUN pip3 install --upgrade pip
RUN python3 -m pip install /proxy
RUN rm -rf /proxy
EXPOSE 2222
CMD python3 -m haas_proxy --nodaemon haas_proxy --device-token ${DEVICE_TOKEN}
......@@ -55,6 +55,10 @@ release: build
upload:
python3 setup.py register sdist upload
upload-docker: build-docker
docker tag haas-proxy cznic/haas-proxy
docker push cznic/haas-proxy
build:
# Debian packages
${FPM_CMD_PY2} -t deb setup.py
......@@ -67,6 +71,9 @@ build:
# Just archive, no deps
python setup.py sdist --formats=gztar --dist-dir .
build-docker:
docker build --no-cache -t haas-proxy .
clean:
python setup.py clean
rm -rf *.deb *.rpm *.tar
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment