tools/stx/dockerfiles/stx-pkgbuilder.Dockerfile
Robert Church a38983ac4c debian: Use Debian Global CDN Mirror
Remove country specific Debian mirror locations in favor of one backed
by a global CDN.

This should, in general, provide better response times for debian mirror
access.

Test Plan:
 - PASS: Rebuild containers
 - PASS: Download artifacts
 - PASS: Build all packages
 - PASS: Build ISO
 - Observed faster download an build times.

Change-Id: Ic77533d2796cb7aadd85ed0c29554af33d6f5b95
Story: 2008846
Task: 44397
Signed-off-by: Robert Church <robert.church@windriver.com>
2022-02-02 05:33:47 -05:00

62 lines
1.9 KiB
Docker

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright (C) 2021 Wind River Systems,Inc.
#
FROM debian:bullseye
RUN echo "deb-src http://deb.debian.org/debian bullseye main" >> /etc/apt/sources.list
# Download required dependencies by mirror/build processes.
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
live-build \
pbuilder \
debootstrap \
devscripts \
schroot \
debmake \
dpkg-dev \
apt-utils \
sbuild \
osc \
python3-pip \
git \
wget \
curl \
vim \
sudo \
emacs \
tini \
procps && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
pip3 install Flask && \
sudo sbuild-adduser root
# workaround for docker debootstrap bug
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968927
RUN cd /tmp && \
wget \
http://deb.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.126+nmu1_all.deb && \
dpkg -i debootstrap_1.0.126+nmu1_all.deb
RUN groupadd crontab
COPY stx/toCOPY/pkgbuilder/app.py /opt/
COPY stx/toCOPY/pkgbuilder/debbuilder.py /opt/
COPY stx/toCOPY/pkgbuilder/setup.sh /opt/
COPY stx/toCOPY/pkgbuilder/debbuilder.conf /etc/sbuild/sbuild.conf
ENTRYPOINT ["/usr/bin/tini", "--"]
WORKDIR /opt
CMD ["python3", "app.py"]