Skip to content

Commit

Permalink
- allow docker to build image from current src
Browse files Browse the repository at this point in the history
  • Loading branch information
maho committed Dec 26, 2018
1 parent 4ff8e77 commit 7158ceb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
# Dockerfile for providing buildozer
# Build with:
# docker build --tag=buildozer .
#
# if you want to use bleeding edge/current version from git, instead from pypi, then use
# docker build --tag=buildozer --build-arg git=true .
#
# In order to give the container access to your current working directory
# it must be mounted using the --volume option.
# Run with (e.g. `buildozer --version`):
# docker run --volume "$(pwd)":/home/user/hostcwd buildozer --version
# Or for interactive shell:
# docker run --volume "$(pwd)":/home/user/hostcwd --entrypoint /bin/bash -it --rm buildozer

FROM ubuntu:18.04
ARG git

ENV BDOZER_REQ=${git:+"/src"}
ENV BDOZER_REQ=${BDOZER_REQ:-"buildozer"}
ENV USER="user"
ENV HOME_DIR="/home/${USER}"
ENV WORK_DIR="${HOME_DIR}/hostcwd" \
PATH="${HOME_DIR}/.local/bin:${PATH}"

COPY . /src

# configures locale
RUN apt update -qq > /dev/null && \
apt install -qq --yes --no-install-recommends \
Expand Down Expand Up @@ -44,7 +54,8 @@ USER ${USER}
WORKDIR ${WORK_DIR}

# installs buildozer and dependencies
RUN pip install --user Cython==0.25.2 buildozer
RUN pip install --user Cython==0.25.2 $BDOZER_REQ

# calling buildozer adb command should trigger SDK/NDK first install and update
# but it requires a buildozer.spec file
RUN cd /tmp/ && buildozer init && buildozer android adb -- version && cd -
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def find_version(*file_paths):
license='MIT',
packages=[
'buildozer', 'buildozer.targets', 'buildozer.libs', 'buildozer.scripts'
],
],
package_data={'buildozer': ['default.spec']},
include_package_data=True,
install_requires=['pexpect', 'virtualenv'],
install_requires=['pexpect', 'virtualenv', 'sh'],
classifiers=[
'Development Status :: 4 - Beta', 'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
Expand Down

0 comments on commit 7158ceb

Please sign in to comment.