This repository has been archived on 2024-12-13. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-13/packages/docker/Dockerfile.bionic

105 lines
2.9 KiB
Docker
Raw Normal View History

FROM ubuntu:bionic AS base
ENV DEBIAN_FRONTEND noninteractive
ENV TRAVIS_SKIP_APT_UPDATE 1
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN apt-get update
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
software-properties-common
RUN dpkg --add-architecture i386
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get -y install sudo
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
# travis xenial bionic
2021-12-03 17:41:55 +01:00
python-setuptools libssl-dev libpq-dev python-prctl \
python-dev python-virtualenv python-pip virtualenv \
# dpkg
2021-12-03 17:41:55 +01:00
python-minimal python-all python openssl libssl-dev \
dh-apparmor debhelper dh-python python-msgpack python-qt4 git python-stdeb \
python-all-dev python-crypto python-psutil \
2021-12-03 17:41:55 +01:00
fakeroot python-pytest python3-wheel \
# Code quality
pylint python-pycodestyle python3-pycodestyle pycodestyle python-flake8 \
python3-flake8 flake8 python-pyflakes python3-pyflakes pyflakes pyflakes3 \
curl \
# Wine
python python-pip wget wine-stable winetricks mingw-w64 wine32 wine64 xvfb \
# Buildbot
python3-dev libffi-dev python3-setuptools \
python3-pip \
# python 3.7
python3.7 python3.7-dev \
# .travis.yml
build-essential libcap-dev tor \
language-pack-en
# cleanup
RUN rm -rf /var/lib/apt/lists/*
#####################################################################################################
FROM base AS travis
# 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
RUN useradd -m -U builder
RUN echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# copy sources
COPY . /home/builder/src
RUN chown -R builder.builder /home/builder/src
USER builder
WORKDIR /home/builder/src
ENTRYPOINT /usr/local/bin/travis2bash.sh
#####################################################################################################
FROM base AS buildbot
# 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
#################################################################################################
FROM base AS appimage
COPY . /home/builder/src
WORKDIR /home/builder/src
RUN python setup.py -V
RUN python setup.py sdist
RUN python setup.py --command-packages=stdeb.command bdist_deb
RUN dpkg-deb -I deb_dist/pybitmessage_0.6.3.2-1_amd64.deb
RUN buildscripts/appimage.sh
RUN out/PyBitmessage-0.6.3.2.glibc2.15-x86_64.AppImage --appimage-extract-and-run -t