Adder user in docker image

This commit is contained in:
Ganesh Gore 2022-05-14 22:34:35 -06:00
parent 17c4e9a1bb
commit cbb7faa68d
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-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}