# Autogenerated Dockerfile for ubuntu-22.04-amd64.
# Update data in gitlab/data.yml.j2 and gitlab/Dockerfile.j2
# to change this file.
# Request a manual pipeline to rebuild the image here:
#     https://gitlab.nic.cz/labs/bird/-/pipelines/new
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN find /etc/apt/sourc* -type f -exec grep -nH '.*' '{}' +
RUN dpkg --add-architecture riscv64
RUN find /etc/apt/sourc* -type f -exec sed -i 's/^deb /deb [arch=amd64] /' '{}' +
RUN find /etc/apt/sourc* -type f -exec sed -r '/^deb /{s#arch=amd64#arch=riscv64#;s#https?://[^ ]+#http://ports.ubuntu.com/ubuntu-ports/#}' '{}' + > /etc/apt/sources.list.d/crossbuild.list
RUN find /etc/apt/sourc* -type f -exec grep -nH '.*' '{}' +
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y --no-install-recommends install \
	tzdata \
	build-essential \
	flex \
	bison \
	autoconf \
	ncurses-dev \
	libreadline-dev \
	libssh-gcrypt-dev \
	crossbuild-essential-riscv64 \
	libreadline-dev:riscv64 \
	ncurses-dev:riscv64 \
	qemu-user \
	qemu-user-binfmt \
	binfmt-support \
	linuxdoc-tools-latex \
	texlive-latex-extra \
	opensp \
	docbook-xsl \
	xsltproc
RUN apt-get -y --no-install-recommends install \
	git \
	dpkg-dev \
	debhelper \
	lsb-release \
	apt-utils \
	quilt \
	python3 \
	python3-pip \
	python3-setuptools \
	python3-venv
RUN apt-get -y clean
