Skip to content

Commit

Permalink
Recover master and master web Dockerfile
Browse files Browse the repository at this point in the history
Use local github registry to pull hadolint tool.
  • Loading branch information
fauust committed Jul 26, 2023
1 parent dc82201 commit 5ec9bda
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bb_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
- name: Check Dockerfile with hadolint
run: |
cp /home/runner/work/Dockerfile .
docker run -i -v $(pwd):/mnt -w /mnt hadolint/hadolint:latest hadolint /mnt/Dockerfile
docker run -i -v $(pwd):/mnt -w /mnt ghcr.io/hadolint/hadolint:latest hadolint /mnt/Dockerfile
- name: Install qemu-user-static
run: |
sudo apt-get update
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/bbm_build_container.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: bbm build container


on:
push:
paths:
Expand All @@ -22,10 +23,10 @@ jobs:
- 5000:5000

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Check Dockerfile with hadolint
run: |
docker run -i -v $(pwd):/mnt -w /mnt hadolint/hadolint:latest hadolint /mnt/Dockerfile
docker run -i -v $(pwd):/mnt -w /mnt ghcr.io/hadolint/hadolint:latest hadolint /mnt/Dockerfile
- name: Set up env vars
run: |
echo "REPO=bb-master" >>$GITHUB_ENV
Expand Down
70 changes: 70 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Buildbot master and master-web containers

FROM debian:11-slim
LABEL maintainer="MariaDB Buildbot maintainers"
ARG DEBIAN_FRONTEND=noninteractive
ARG master_type="master"

WORKDIR /opt/buildbot
# hadolint ignore=DL3003
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get -y install --no-install-recommends \
build-essential \
git \
libmariadb-dev \
libvirt-dev \
netcat \
pkg-config \
python3 \
python3-dev \
python3-distutils \
python3-pip \
python3-venv \
&& if [ "$master_type" = "master-web" ]; then \
apt-get -y install --no-install-recommends \
libcairo2 \
yarnpkg; \
export PATH="/usr/share/nodejs/yarn/bin:$PATH"; \
yarn global --ignore-engines add gulp yo generator-buildbot-dashboard; \
fi \
&& git clone --branch grid https://github.com/vladbogo/buildbot . \
&& python3 -m venv .venv \
&& . .venv/bin/activate \
&& if [ "$master_type" = "master-web" ]; then \
make frontend; \
fi \
&& pip install --no-cache-dir wheel \
&& pip install --no-cache-dir autobahn==20.7.1 PyJWT==1.7.1 \
&& cd master && python setup.py bdist_wheel \
&& pip install --no-cache-dir dist/*.whl \
&& pip install --no-cache-dir pip -U \
&& pip install --no-cache-dir \
buildbot-prometheus \
buildbot-worker \
docker==4.3.1 \
flask \
libvirt-python \
mock \
mysqlclient \
pyzabbix \
sqlalchemy==1.3.23 \
treq \
&& if [ "$master_type" = "master-web" ]; then \
pip install --no-cache-dir pyjade; \
fi \
&& ln -s /opt/buildbot/.venv/bin/buildbot /usr/local/bin/buildbot \
# cleaning \
&& apt-get purge -y \
build-essential \
pkg-config \
python3-dev \
python3-pip \
python3-venv \
&& if [ "$master_type" = "master-web" ]; then \
apt-get purge -y yarnpkg; \
rm -rf "$(find /opt/buildbot -maxdepth 3 -name node_modules)"; \
fi \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

0 comments on commit 5ec9bda

Please sign in to comment.