Merge pull request #11 from horjulf/develop

Add docker build by branch
pull/54/head
James 7 years ago committed by desimaniac
commit a929709aad

@ -1,23 +0,0 @@
# Git
.git
# Systemd files
systemd
# Logs
*.log*
# Configs
*.json
# Byte-compiled / optimized / DLL files
**/__pycache__
*.py[cod]
*$py.class
*.pyc
# Pyenv
**/.python-version
# User-specific stuff:
.idea

@ -0,0 +1,2 @@
# Hooks
hooks

@ -1,13 +1,12 @@
FROM python:3.6-alpine3.7 FROM python:3.6-alpine3.7
# Default branch to master
ARG BRANCH=master
ENV \ ENV \
# App directory
APP_DIR=traktarr \ APP_DIR=traktarr \
# Branch to clone BRANCH=${BRANCH} \
BRANCH=master \
# Config file
TRAKTARR_CONFIG=/config/config.json \ TRAKTARR_CONFIG=/config/config.json \
# Log file
TRAKTARR_LOGFILE=/config/traktarr.log TRAKTARR_LOGFILE=/config/traktarr.log
RUN \ RUN \
@ -15,7 +14,7 @@ RUN \
apk --no-cache -U upgrade && \ apk --no-cache -U upgrade && \
echo "** Install OS dependencies **" && \ echo "** Install OS dependencies **" && \
apk --no-cache -U add git && \ apk --no-cache -U add git && \
echo "** Get Traktarr **" && \ echo "** Get Traktarr branch: ${BRANCH} **" && \
git clone --depth 1 --branch ${BRANCH} https://github.com/l3uddz/traktarr.git /${APP_DIR} && \ git clone --depth 1 --branch ${BRANCH} https://github.com/l3uddz/traktarr.git /${APP_DIR} && \
echo "** Install PIP dependencies **" && \ echo "** Install PIP dependencies **" && \
pip install --no-cache-dir --upgrade pip setuptools && \ pip install --no-cache-dir --upgrade pip setuptools && \

@ -0,0 +1,3 @@
#!/bin/bash
docker build --build-arg BRANCH=${SOURCE_BRANCH} -f ${DOCKERFILE_PATH} -t ${IMAGE_NAME} .
Loading…
Cancel
Save