mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
b65f2509a2
devcontainers are a convenient way to provide users a reproducible build environment. It is currently supported by Visual Studio Code, Visual Studio and IntelliJ. When the user opens the verilator repo in VSCode with the standard devcontainer extension installed, VSCode will ask the user if they want to reopen in the devcontainer, then build the Docker image as per our definition and then restart VSCode 'remotely' attached to the Docker container. More information: https://code.visualstudio.com/docs/devcontainers/containers Also: - zlibc is missing on Debian-based systems now - Add non-root user to Dockerfile and make default
69 lines
2.0 KiB
Docker
69 lines
2.0 KiB
Docker
# DESCRIPTION: Dockerfile for env to build and fully test Verilator
|
|
#
|
|
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
# Version 2.0.
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
|
|
FROM ubuntu:22.04
|
|
|
|
# Create the user
|
|
RUN groupadd verilator \
|
|
&& useradd -g verilator -m verilator -s /bin/bash \
|
|
&& apt-get update \
|
|
&& apt-get install --no-install-recommends -y sudo \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& echo verilator ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/verilator \
|
|
&& chmod 0440 /etc/sudoers.d/verilator
|
|
|
|
RUN apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive \
|
|
apt-get install --no-install-recommends -y \
|
|
autoconf \
|
|
bc \
|
|
bison \
|
|
build-essential \
|
|
ca-certificates \
|
|
ccache \
|
|
clang \
|
|
cmake \
|
|
flex \
|
|
gdb \
|
|
git \
|
|
gtkwave \
|
|
help2man \
|
|
libfl2 \
|
|
libfl-dev \
|
|
libgoogle-perftools-dev \
|
|
libsystemc \
|
|
libsystemc-dev \
|
|
numactl \
|
|
perl \
|
|
python3 \
|
|
wget \
|
|
zlib1g \
|
|
zlib1g-dev \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN cpan install -fi Parallel::Forker
|
|
|
|
RUN git clone https://github.com/veripool/vcddiff.git && \
|
|
make -C vcddiff && \
|
|
cp -p vcddiff/vcddiff /usr/local/bin/vcddiff && \
|
|
rm -rf vcddiff
|
|
|
|
COPY build.sh /tmp/build.sh
|
|
|
|
ENV VERILATOR_AUTHOR_SITE=1
|
|
|
|
USER verilator
|
|
|
|
WORKDIR /work
|
|
|
|
ENTRYPOINT [ "/tmp/build.sh" ]
|