2018-06-18 21:54:54 +02:00
|
|
|
# Dockerfile for providing buildozer
|
2019-03-10 23:11:10 +01:00
|
|
|
#
|
2018-06-18 21:54:54 +02:00
|
|
|
# Build with:
|
2019-03-10 23:11:10 +01:00
|
|
|
# docker build --tag=kivy/buildozer .
|
2018-12-28 12:30:39 +01:00
|
|
|
#
|
2018-06-18 21:54:54 +02:00
|
|
|
# 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`):
|
2019-03-10 23:11:10 +01:00
|
|
|
# docker run \
|
|
|
|
# --volume "$HOME/.buildozer":/home/user/.buildozer \
|
2019-03-12 19:31:46 +01:00
|
|
|
# --volume "$PWD":/home/user/hostcwd \
|
2019-03-10 23:11:10 +01:00
|
|
|
# kivy/buildozer --version
|
|
|
|
#
|
2018-06-18 21:54:54 +02:00
|
|
|
# Or for interactive shell:
|
2019-03-10 23:11:10 +01:00
|
|
|
# docker run --interactive --tty --rm \
|
|
|
|
# --volume "$HOME/.buildozer":/home/user/.buildozer \
|
2019-03-12 19:31:46 +01:00
|
|
|
# --volume "$PWD":/home/user/hostcwd \
|
2019-03-10 23:11:10 +01:00
|
|
|
# --entrypoint /bin/bash \
|
|
|
|
# kivy/buildozer
|
|
|
|
#
|
|
|
|
# If you get a `PermissionError` on `/home/user/.buildozer/cache`,
|
|
|
|
# try updating the permissions from the host with:
|
|
|
|
# sudo chown $USER -R ~/.buildozer
|
|
|
|
# Or simply recreate the directory from the host with:
|
|
|
|
# rm -rf ~/.buildozer && mkdir ~/.buildozer
|
2018-12-28 12:30:39 +01:00
|
|
|
|
2018-06-18 21:54:54 +02:00
|
|
|
FROM ubuntu:18.04
|
|
|
|
|
|
|
|
ENV USER="user"
|
|
|
|
ENV HOME_DIR="/home/${USER}"
|
|
|
|
ENV WORK_DIR="${HOME_DIR}/hostcwd" \
|
2019-03-08 01:18:04 +01:00
|
|
|
SRC_DIR="${HOME_DIR}/src" \
|
2018-06-18 21:54:54 +02:00
|
|
|
PATH="${HOME_DIR}/.local/bin:${PATH}"
|
|
|
|
|
|
|
|
# configures locale
|
|
|
|
RUN apt update -qq > /dev/null && \
|
|
|
|
apt install -qq --yes --no-install-recommends \
|
|
|
|
locales && \
|
|
|
|
locale-gen en_US.UTF-8
|
|
|
|
ENV LANG="en_US.UTF-8" \
|
|
|
|
LANGUAGE="en_US.UTF-8" \
|
|
|
|
LC_ALL="en_US.UTF-8"
|
|
|
|
|
2019-03-10 23:11:10 +01:00
|
|
|
# system requirements to build most of the recipes
|
2018-06-18 21:54:54 +02:00
|
|
|
RUN apt install -qq --yes --no-install-recommends \
|
2019-03-10 23:11:10 +01:00
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
build-essential \
|
|
|
|
ccache \
|
|
|
|
cmake \
|
|
|
|
gettext \
|
|
|
|
git \
|
|
|
|
libffi-dev \
|
|
|
|
libltdl-dev \
|
2020-05-11 18:14:36 +02:00
|
|
|
libssl-dev \
|
2019-03-10 23:11:10 +01:00
|
|
|
libtool \
|
|
|
|
openjdk-8-jdk \
|
|
|
|
patch \
|
|
|
|
pkg-config \
|
|
|
|
python3-pip \
|
|
|
|
python3-setuptools \
|
|
|
|
sudo \
|
|
|
|
unzip \
|
|
|
|
zip \
|
|
|
|
zlib1g-dev
|
2018-06-18 21:54:54 +02:00
|
|
|
|
|
|
|
# prepares non root env
|
|
|
|
RUN useradd --create-home --shell /bin/bash ${USER}
|
|
|
|
# with sudo access and no password
|
|
|
|
RUN usermod -append --groups sudo ${USER}
|
|
|
|
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|
|
|
|
|
|
|
USER ${USER}
|
|
|
|
WORKDIR ${WORK_DIR}
|
2019-03-08 01:18:04 +01:00
|
|
|
COPY --chown=user:user . ${SRC_DIR}
|
2018-06-18 21:54:54 +02:00
|
|
|
|
|
|
|
# installs buildozer and dependencies
|
2020-04-08 20:58:00 +02:00
|
|
|
RUN pip3 install --user --upgrade Cython==0.28.6 wheel pip virtualenv ${SRC_DIR}
|
2018-06-18 21:54:54 +02:00
|
|
|
|
|
|
|
ENTRYPOINT ["buildozer"]
|