Docker cleanup. (#8226)

This commit is contained in:
Michaël Arnauts 2017-06-30 17:07:33 +02:00 committed by Paulus Schoutsen
parent 96e1d5524a
commit a663dbada0
9 changed files with 45 additions and 23 deletions

View file

@ -1,2 +1,14 @@
.tox
# General files
.git
.github
config
# Test related files
.tox
# Other virtualization methods
venv
.vagrant
# Temporary files
**/__pycache__

View file

@ -1,3 +1,7 @@
# Notice:
# When updating this file, please also update virtualization/Docker/Dockerfile.dev
# This way, the development image and the production image are kept in sync.
FROM python:3.6
MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
@ -21,6 +25,7 @@ RUN virtualization/Docker/setup_docker_prereqs
# Install hass component dependencies
COPY requirements_all.txt requirements_all.txt
# Uninstall enum34 because some depenndecies install it but breaks Python 3.4+.
# See PR #8103 for more info.
RUN pip3 install --no-cache-dir -r requirements_all.txt && \

View file

@ -25,8 +25,12 @@ RUN virtualization/Docker/setup_docker_prereqs
# Install hass component dependencies
COPY requirements_all.txt requirements_all.txt
# Uninstall enum34 because some depenndecies install it but breaks Python 3.4+.
# See PR #8103 for more info.
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet && \
pip3 uninstall -y enum34
# BEGIN: Development additions

View file

@ -6,6 +6,9 @@ set -e
apt-get install -y --no-install-recommends git autoconf automake libtool
cd /usr/src/app/
mkdir -p build && cd build
git clone --depth 1 --recursive -b dtls https://github.com/home-assistant/libcoap.git
cd libcoap
./autogen.sh

View file

@ -12,7 +12,7 @@ PYTHON_LDLIBRARY=$(python -c 'from distutils import sysconfig; print(sysconfig.g
PYTHON_LIBRARY="${PYTHON_LIBDIR}/${PYTHON_LDLIBRARY}"
PYTHON_INCLUDE_DIR=$(python -c 'from distutils import sysconfig; print(sysconfig.get_python_inc())')
cd "$(dirname "$0")/.."
cd /usr/src/app/
mkdir -p build && cd build
if [ ! -d libcec ]; then

View file

@ -11,11 +11,14 @@ PACKAGES=(
apt-get install -y --no-install-recommends ${PACKAGES[@]}
cd /usr/src/app/
mkdir -p build && cd build
# Clone the latest code from GitHub
git clone --depth 1 https://github.com/openalpr/openalpr.git /usr/local/src/openalpr
git clone --depth 1 https://github.com/openalpr/openalpr.git openalpr
# Setup the build directory
cd /usr/local/src/openalpr/src
cd openalpr/src/
mkdir -p build
cd build

View file

@ -6,7 +6,7 @@ set -e
PHANTOMJS_VERSION="2.1.1"
cd "$(dirname "$0")/.."
cd /usr/src/app/
mkdir -p build && cd build
curl -LSO https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2

View file

@ -10,20 +10,15 @@ PACKAGES=(
apt-get install -y --no-install-recommends ${PACKAGES[@]}
cd /usr/src/app/
mkdir -p build && cd build
# Clone the latest code from GitHub
git clone --depth 1 https://github.com/auerswal/ssocr.git /usr/local/src/ssocr
git clone --depth 1 https://github.com/auerswal/ssocr.git ssocr
cd ssocr/
# Build ssocr
(
# Setup the build directory
cd /usr/local/src/ssocr
# Compile the library
make
# compile the library
make
# Install the binaries/libraries to your local system (prefix is /usr/local)
make install
# Cleanup
make clean
)
# Install the binaries/libraries to your local system (prefix is /usr/local)
make install

View file

@ -30,8 +30,8 @@ PACKAGES=(
# Required debian packages for building dependencies
PACKAGES_DEV=(
cmake git
# libcec
cmake
git
swig
)
@ -73,4 +73,4 @@ apt-get -y --purge autoremove
# Cleanup
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* build/
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/src/app/build/