Merge pull request #654 from lnis-uofu/binder

Added user to the docker image
This commit is contained in:
tangxifan 2022-05-16 12:02:45 +08:00 committed by GitHub
commit bbf5108d18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -1,4 +1,4 @@
apt-get install --no-install-recommends -y \
libdatetime-perl libc6 libffi6 libgcc1 libreadline7 libstdc++6 \
libtcl8.6 python3.8 python3-pip zlib1g libbz2-1.0 \
iverilog git rsync make curl wget
iverilog git rsync make curl wget tree python3.8-venv

View File

@ -7,3 +7,21 @@ RUN chmod +x yosys/install/bin/yosys yosys/install/bin/yosys-abc yosys/install/b
ENV PATH="/opt/openfpga/openfpga:/opt/openfpga/yosys/install/bin:${PATH}"
ENV PATH="/opt/openfpga/ace2:/opt/openfpga/abc:/opt/openfpga/vpr:${PATH}"
ENV OPENFPGA_PATH="/opt/openfpga"
ARG NB_USER=openfpga_user
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
USER root
RUN chown -R ${NB_UID} ${HOME}
RUN chmod -R +r /opt/openfpga/
USER ${NB_USER}
WORKDIR ${HOME}