Dockerfile.buildenv 1.48 KB
Newer Older
1
2
ARG REGISTRY=
ARG TAG=:latest
3
4
FROM ubuntu:jammy
RUN apt-get update \
5
6
7
8
 && DEBIAN_FRONTEND=noninteractive \
    TZ=Europe/Berlin \
    apt-get install -y \
	apt-utils \
9
10
11
12
	autoconf \
	bc \
	bison \
	build-essential \
Marvin Meiers's avatar
Marvin Meiers committed
13
	cmake \
14
15
16
17
	doxygen \
	g++ \
	flex \
	git \
18
	kmod \
19
20
21
22
23
	libboost-coroutine-dev \
	libboost-fiber-dev \
	libboost-iostreams-dev \
	libelf-dev \
	libglib2.0-dev \
24
	libgoogle-perftools-dev \
25
26
	libpcap-dev \
	libpixman-1-dev \
27
	libprotobuf-dev \
28
	locales \
29
	ninja-build \
30
31
32
	protobuf-compiler \
	python-is-python3 \
	python3-dev \
33
	python3-pip \
34
35
36
37
	rsync \
	scons \
	unzip \
	wget \
38
39
	nano \
	vim \
40
 && locale-gen en_US.UTF-8 \
41
 && rm -rf /var/lib/apt/lists/*
42
COPY requirements.txt /tmp/requirements.txt
43
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
44
45
46
47
48
49
50
51
52
53
54
COPY verilator.patch /tmp/
RUN cd /tmp \
 && git clone -b v4.010 https://github.com/verilator/verilator \
 && cd verilator \
 && patch -p1 < /tmp/verilator.patch \
 && autoupdate \
 && autoconf \
 && ./configure \
 && make -j`nproc` \
 && make install \
 && rm -rf /tmp/verilator
55
56
57
58
59
60
61
62
63
64
65
66

# Add non-root user for vs code devcontainer.
ARG USERNAME=simbricks
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
 && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME --shell /bin/bash \
# Add sudo support for this user and remove the need to type in password.
 && apt-get update \
 && apt-get install -y sudo \
 && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
 && chmod 0440 /etc/sudoers.d/$USERNAME