Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
# Based on Ubuntu
FROM ubuntu:24.04
# Info about the image
LABEL maintainer="Dan Petrisko <petrisko@cs.washington.edu>"
# Ubuntu tools
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && apt-get install -y --no-install-recommends \
apt-utils software-properties-common lsb-release tzdata uuid-dev default-jre \
build-essential bash autoconf automake autotools-dev curl gawk wget \
git vim bash-completion \
python3 python3-dev python3-pip python3-venv python3-setuptools-whl \
git help2man perl make libfl2 libfl-dev zlib1g flex bison \
ccache mold libgoogle-perftools-dev numactl perl-doc \
cmake rsync \
device-tree-compiler \
pkg-config tcl tcl-dev libreadline-dev libffi-dev \
gperf virtualenv \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Accept arguments for user and group
ARG USER_NAME
ARG USER_ID
ARG GROUP_NAME
ARG GROUP_ID
ARG OTHER_GROUPS
ARG WORKDIR=/work
# Only create the group if it doesn't exist
RUN getent group $GROUP_ID || groupadd --gid $GROUP_ID $GROUP_NAME
# Use --no-log-init to deal with large userids creating giant log files
RUN useradd --no-log-init --uid $USER_ID --gid $GROUP_ID --home-dir $WORKDIR $USER_NAME
# Add the user to other groups
RUN for gid in ${OTHER_GROUPS}; do \
echo "group$gid"; \
groupadd -g $gid "group$gid" || true; \
usermod -aG "group$gid" $USER_NAME; \
done
# Create directory for extra installation
RUN mkdir -p /opt && chgrp $GROUP_NAME /opt && chmod 775 /opt
# Create custom entrypoint script
COPY entrypoint.ubuntu24.04.sh /usr/bin/entrypoint.sh
RUN chmod +x /usr/bin/entrypoint.sh
# Create the default workdir
RUN mkdir -p ${WORKDIR}
RUN chown ${USER_NAME} ${WORKDIR}
# Set the default workdir
WORKDIR $WORKDIR
# Set the current user
USER $USER_NAME
# Create a python virtualenv
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
COPY requirements.txt /opt/venv/
RUN /opt/venv/bin/pip install -r /opt/venv/requirements.txt
# Kick off with bash
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
CMD ["/bin/bash"]
563ab6561This file is pinned to the selected release. Download the original to open it in your design tool.