mirror of
https://github.com/buildbot/buildbot.git
synced 2021-05-20 10:47:20 +03:00
Use only python3 for buildbot worker docker image.
This commit is contained in:
committed by
Pierre Tardy
parent
e2147bf86b
commit
922582f12a
@@ -0,0 +1 @@
|
||||
Use only python3 for buildbot worker docker image
|
||||
@@ -24,11 +24,11 @@ RUN apt-get update && \
|
||||
build-essential \
|
||||
git \
|
||||
subversion \
|
||||
python-dev \
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
python-setuptools \
|
||||
python-pip \
|
||||
python3-setuptools \
|
||||
python3-pip \
|
||||
# Test runs produce a great quantity of dead grandchild processes. In a
|
||||
# non-docker environment, these are automatically reaped by init (process 1),
|
||||
# so we need to simulate that here. See https://github.com/Yelp/dumb-init
|
||||
@@ -36,18 +36,18 @@ RUN apt-get update && \
|
||||
curl && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
# Install required python packages, and twisted
|
||||
pip --no-cache-dir install 'twisted[tls]' && \
|
||||
pip install virtualenv && \
|
||||
pip3 --no-cache-dir install 'twisted[tls]' && \
|
||||
pip3 install virtualenv && \
|
||||
mkdir /buildbot &&\
|
||||
useradd -ms /bin/bash buildbot
|
||||
|
||||
COPY . /usr/src/buildbot-worker
|
||||
COPY docker/buildbot.tac /buildbot/buildbot.tac
|
||||
|
||||
RUN pip install /usr/src/buildbot-worker && \
|
||||
RUN pip3 install /usr/src/buildbot-worker && \
|
||||
chown -R buildbot /buildbot
|
||||
|
||||
USER buildbot
|
||||
WORKDIR /buildbot
|
||||
|
||||
CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"]
|
||||
CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"]
|
||||
@@ -1,55 +0,0 @@
|
||||
# generated by 'make -f Makefile Dockerfile.py3', do not edit
|
||||
|
||||
# buildbot/buildbot-worker
|
||||
|
||||
# please follow docker best practices
|
||||
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
|
||||
|
||||
# Provides a base Ubuntu (20.04) image with latest buildbot worker installed
|
||||
# the worker image is not optimized for size, but rather uses ubuntu for wider package availability
|
||||
|
||||
FROM ubuntu:20.04
|
||||
MAINTAINER Buildbot maintainers
|
||||
|
||||
|
||||
# Last build date - this can be updated whenever there are security updates so
|
||||
# that everything is rebuilt
|
||||
ENV security_updates_as_of 2018-06-15
|
||||
|
||||
# This will make apt-get install without question
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install security updates and required packages
|
||||
RUN apt-get update && \
|
||||
apt-get -y upgrade && \
|
||||
apt-get -y install -q \
|
||||
build-essential \
|
||||
git \
|
||||
subversion \
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
python3-setuptools \
|
||||
python3-pip \
|
||||
# Test runs produce a great quantity of dead grandchild processes. In a
|
||||
# non-docker environment, these are automatically reaped by init (process 1),
|
||||
# so we need to simulate that here. See https://github.com/Yelp/dumb-init
|
||||
dumb-init \
|
||||
curl && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
# Install required python packages, and twisted
|
||||
pip3 --no-cache-dir install 'twisted[tls]' && \
|
||||
pip3 install virtualenv && \
|
||||
mkdir /buildbot &&\
|
||||
useradd -ms /bin/bash buildbot
|
||||
|
||||
COPY . /usr/src/buildbot-worker
|
||||
COPY docker/buildbot.tac /buildbot/buildbot.tac
|
||||
|
||||
RUN pip3 install /usr/src/buildbot-worker && \
|
||||
chown -R buildbot /buildbot
|
||||
|
||||
USER buildbot
|
||||
WORKDIR /buildbot
|
||||
|
||||
CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"]
|
||||
@@ -4,14 +4,3 @@ pylint:
|
||||
|
||||
flake8:
|
||||
flake8 --config=../common/flake8rc buildbot_worker setup.py
|
||||
|
||||
.PHONY: Dockerfile.py3
|
||||
|
||||
Dockerfile.py3:
|
||||
printf "# generated by 'make -f Makefile Dockerfile.py3', do not edit\n\n" > Dockerfile.py3
|
||||
sed -e "s|python-dev|python3-dev|g" \
|
||||
-e "s|python-setuptool|python3-setuptool|g" \
|
||||
-e "s|pip install|pip3 install|g" \
|
||||
-e "s|python-pip|python3-pip|g" \
|
||||
-e "s|pip --no-cache-dir|pip3 --no-cache-dir|g" \
|
||||
Dockerfile >> Dockerfile.py3
|
||||
|
||||
Reference in New Issue
Block a user