ctf-tools/Dockerfile.fedora
Michael Rodler ec75e3d081 Updated Dockerfiles, added script to quickly run manage-tools in a container for testing
* Dockerfile updates
    * Ubuntus now use apt-get-install wrapper to not leave package lists in the container
    * Copy uncommited manage-tools, etc. scripts into container, which
      is good for manual testing.
    * Remove dependency on virtualenvwrapper for Ubuntus and Fedora
* `ctf-tools-test-action` to quickly test something for another distribution in a docker container, e.g.
  `ctf-tools-test-action -d fedora -s -v reinstall qemu`
2018-04-20 11:12:52 -07:00

29 lines
706 B
Docker

FROM fedora
RUN dnf -y install which sudo git redhat-lsb
RUN useradd -m ctf
COPY .git /home/ctf/tools/.git
RUN chown -R ctf.ctf /home/ctf/tools
RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf
USER ctf
WORKDIR /home/ctf/tools
RUN git checkout .
# add non-commited scripts
USER root
COPY bin/manage-tools /home/ctf/tools/bin/
COPY bin/ctf-tools-pip /home/ctf/tools/bin/
COPY bin/ctf-tools-venv-activate /home/ctf/tools/bin/
COPY bin/ctf-tools-venv-activate3 /home/ctf/tools/bin/
RUN chown -R ctf.ctf /home/ctf/tools
USER ctf
RUN bin/manage-tools -s setup
RUN bin/ctf-tools-pip install appdirs
RUN echo 'source $(which ctf-tools-venv-activate)' >> /home/ctf/.bashrc
WORKDIR /home/ctf
CMD bash -i