2021-11-25 09:29:04 +01:00
|
|
|
FROM ubuntu:bionic AS base
|
2021-02-15 09:20:27 +01:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2021-11-25 09:29:04 +01:00
|
|
|
|
2021-02-15 09:20:27 +01:00
|
|
|
RUN apt-get update
|
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
# Common apt packages
|
2021-02-15 09:20:27 +01:00
|
|
|
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
2022-04-05 01:20:52 +02:00
|
|
|
software-properties-common build-essential libcap-dev libssl-dev \
|
|
|
|
python-all-dev python-setuptools wget xvfb
|
2021-02-15 09:20:27 +01:00
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
###############################################################################
|
2021-02-15 09:20:27 +01:00
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
FROM base AS appimage
|
2021-02-15 09:20:27 +01:00
|
|
|
|
|
|
|
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
2022-04-05 01:20:52 +02:00
|
|
|
debhelper dh-apparmor dh-python python-stdeb fakeroot
|
2021-02-15 09:20:27 +01:00
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
COPY . /home/builder/src
|
2021-11-25 09:29:04 +01:00
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
WORKDIR /home/builder/src
|
|
|
|
|
|
|
|
RUN VERSION=$(python setup.py -V) \
|
|
|
|
&& python setup.py sdist \
|
|
|
|
&& python setup.py --command-packages=stdeb.command bdist_deb \
|
2022-04-07 10:41:00 +02:00
|
|
|
&& dpkg-deb -I deb_dist/pybitmessage_${VERSION}-1_amd64.deb \
|
|
|
|
&& buildscripts/appimage.sh
|
2021-02-15 09:20:27 +01:00
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
###############################################################################
|
2021-02-15 09:20:27 +01:00
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
FROM base AS tox
|
|
|
|
|
|
|
|
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
|
|
|
language-pack-en \
|
|
|
|
libffi-dev python3-dev python3-pip python3.8 python3.8-dev python3.8-venv \
|
|
|
|
python-msgpack python-pip python-qt4 python-six qt5dxcb-plugin tor
|
|
|
|
|
|
|
|
RUN python3.8 -m pip install setuptools wheel
|
|
|
|
RUN python3.8 -m pip install --upgrade pip tox virtualenv
|
2021-02-15 09:20:27 +01:00
|
|
|
|
2021-11-25 09:29:04 +01:00
|
|
|
RUN useradd -m -U builder
|
|
|
|
|
2021-02-15 09:20:27 +01:00
|
|
|
# copy sources
|
|
|
|
COPY . /home/builder/src
|
|
|
|
RUN chown -R builder.builder /home/builder/src
|
|
|
|
|
|
|
|
USER builder
|
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LANGUAGE en_US:en
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
|
2021-02-15 09:20:27 +01:00
|
|
|
WORKDIR /home/builder/src
|
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
ENTRYPOINT ["tox"]
|
2021-11-25 09:29:04 +01:00
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
###############################################################################
|
2021-11-25 09:29:04 +01:00
|
|
|
|
|
|
|
FROM base AS buildbot
|
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
# cleanup
|
|
|
|
RUN rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2021-11-25 09:29:04 +01:00
|
|
|
# travis2bash
|
|
|
|
RUN wget -O /usr/local/bin/travis2bash.sh https://git.bitmessage.org/Bitmessage/buildbot-scripts/raw/branch/master/travis2bash.sh
|
|
|
|
RUN chmod +x /usr/local/bin/travis2bash.sh
|
|
|
|
|
|
|
|
# copy entrypoint
|
|
|
|
COPY packages/docker/buildbot-entrypoint.sh entrypoint.sh
|
|
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
|
|
|
|
RUN useradd -m -U buildbot
|
|
|
|
RUN echo 'buildbot ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
|
|
|
|
|
USER buildbot
|
|
|
|
|
|
|
|
ENTRYPOINT /entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$WORKERPASS"
|
2021-12-03 17:41:55 +01:00
|
|
|
|
2022-04-05 01:20:52 +02:00
|
|
|
###############################################################################
|
2021-12-15 07:44:37 +01:00
|
|
|
|
|
|
|
FROM base AS appandroid
|
|
|
|
|
|
|
|
COPY . /home/builder/src
|
|
|
|
|
|
|
|
WORKDIR /home/builder/src
|
|
|
|
|
|
|
|
RUN chmod +x buildscripts/androiddev.sh
|
|
|
|
|
|
|
|
RUN buildscripts/androiddev.sh
|