Add Dockerfile for running test #1736

Merged
PeterSurda merged 1 commits from dockertest into v0.6 2021-02-17 09:45:06 +01:00
2 changed files with 68 additions and 0 deletions
Showing only changes of commit 574b60ed0e - Show all commits

64
Dockerfile.travis Normal file
View File

@ -0,0 +1,64 @@
FROM ubuntu:bionic AS pybm-travis-bionic
ENV DEBIAN_FRONTEND noninteractive
ENV TRAVIS_SKIP_APT_UPDATE 1
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
python-setuptools libssl-dev libpq-dev python-prctl python-dev \
python-dev python-virtualenv python-pip virtualenv \
# dpkg
python-minimal python-setuptools python-all python openssl libssl-dev \
dh-apparmor debhelper dh-python python-msgpack python-qt4 python-stdeb \
python-all-dev python-crypto python-psutil \
fakeroot python-pytest \
# 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/*
RUN useradd -m -U builder
RUN echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# 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 sources
COPY . /home/builder/src
RUN chown -R builder.builder /home/builder/src
g1itch commented 2021-02-15 16:17:15 +01:00 (Migrated from github.com)
Review

Strange. man chown says chown [OPTION]... [OWNER][:[GROUP]] FILE...

Strange. `man chown` says `chown [OPTION]... [OWNER][:[GROUP]] FILE...`
PeterSurda commented 2021-02-15 17:09:04 +01:00 (Migrated from github.com)
Review

I think OWNER.GROUP is a GNU non-POSIX feature, maybe it doesn't work on BSD, I've been using it on linux since the '90s. But I can change it, no big deal.

I think OWNER.GROUP is a GNU non-POSIX feature, maybe it doesn't work on BSD, I've been using it on linux since the '90s. But I can change it, no big deal.
USER builder
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
WORKDIR /home/builder/src
ENTRYPOINT /usr/local/bin/travis2bash.sh

4
run-tests-in-docker.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
docker build -t pybm-travis-bionic -f Dockerfile.travis .
docker run pybm-travis-bionic