Dockerfile copy instead of git clone

pull/54/head
Filipe Santos 7 years ago
parent ebb8b44eed
commit 7dd10c28be

@ -0,0 +1,45 @@
# User-specific stuff:
.idea
## File-based project format:
*.iws
# IntelliJ
/out/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.pyc
# logs
*.log*
# databases
*.db
# configs
*.cfg
*.json
# generators
*.bat
# Pyenv
**/.python-version
# PyInstaller
build/
dist/
*.manifest
*.spec
# Git
.git
# Systemd
systemd
# Docker files
docker

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

@ -1,21 +1,20 @@
FROM python:3.6-alpine3.7
# Default branch to master
ARG BRANCH=master
# Arguments for build tracking
ARG BRANCH=
ARG COMMIT=
ENV \
APP_DIR=traktarr \
BRANCH=${BRANCH} \
COMMIT=${COMMIT} \
TRAKTARR_CONFIG=/config/config.json \
TRAKTARR_LOGFILE=/config/traktarr.log
RUN \
echo "** BRANCH: ${BRANCH} COMMIT: ${COMMIT} **" && \
echo "** Upgrade all packages **" && \
apk --no-cache -U upgrade && \
echo "** Install OS dependencies **" && \
apk --no-cache -U add git && \
echo "** Get Traktarr branch: ${BRANCH} **" && \
git clone --depth 1 --branch ${BRANCH} https://github.com/l3uddz/traktarr.git /${APP_DIR} && \
echo "** Install PIP dependencies **" && \
pip install --no-cache-dir --upgrade pip setuptools && \
pip install --no-cache-dir --upgrade -r /${APP_DIR}/requirements.txt

@ -1,3 +1,3 @@
#!/bin/bash
docker build --build-arg BRANCH=${SOURCE_BRANCH} -f ${DOCKERFILE_PATH} -t ${IMAGE_NAME} .
docker build --build-arg BRANCH=${SOURCE_BRANCH} --build-arg COMMIT=${SOURCE_COMMIT} -f ${DOCKERFILE_PATH} -t ${IMAGE_NAME} .

Loading…
Cancel
Save