mirror of https://github.com/pwndbg/pwndbg.git
Support Arch Linux docker test (#1378)
* Specify dockerfile for ubuntu/debian To add Dockerfile.arch later * Support Arch Linux docker test * Fix setup-dev supported distro * Create set_zigpath function * Download zig from upstream for archlinux * Add hash as part of key for docker cache as https://github.com/satackey/action-docker-layer-caching#inputs notes.pull/1390/head
parent
995a1e959e
commit
1224cf75ef
@ -0,0 +1,46 @@
|
||||
# This dockerfile was created for development & testing purposes, for Pacman-based distro.
|
||||
#
|
||||
# Build as: docker build -f Dockerfile.arch -t pwndbg .
|
||||
#
|
||||
# For testing use: docker run --rm -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined pwndbg bash
|
||||
#
|
||||
# For development, mount the directory so the host changes are reflected into container:
|
||||
# docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v `pwd`:/pwndbg pwndbg bash
|
||||
#
|
||||
|
||||
ARG image=archlinux:latest
|
||||
FROM $image
|
||||
|
||||
WORKDIR /pwndbg
|
||||
|
||||
ENV LANG en_US.utf8
|
||||
ENV TZ=America/New_York
|
||||
ENV ZIGPATH=/opt/zig
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
|
||||
echo $TZ > /etc/timezone && \
|
||||
pacman -Syu --noconfirm && \
|
||||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
|
||||
pacman -S --noconfirm vim && \
|
||||
pacman -Scc --noconfirm
|
||||
|
||||
ADD ./setup.sh /pwndbg/
|
||||
ADD ./requirements.txt /pwndbg/
|
||||
ADD ./dev-requirements.txt /pwndbg/
|
||||
# The `git submodule` is commented because it refreshes all the sub-modules in the project
|
||||
# but at this time we only need the essentials for the set up. It will execute at the end.
|
||||
RUN sed -i "s/^git submodule/#git submodule/" ./setup.sh && \
|
||||
./setup.sh
|
||||
|
||||
# Comment these lines if you won't run the tests.
|
||||
ADD ./setup-dev.sh /pwndbg/
|
||||
RUN ./setup-dev.sh
|
||||
|
||||
RUN echo "source /pwndbg/gdbinit.py" >> ~/.gdbinit.py && \
|
||||
echo "PYTHON_MINOR=$(python3 -c "import sys;print(sys.version_info.minor)")" >> /root/.bashrc && \
|
||||
echo "PYTHON_PATH=\"/usr/local/lib/python3.${PYTHON_MINOR}/dist-packages/bin\"" >> /root/.bashrc && \
|
||||
echo "export PATH=$PATH:$PYTHON_PATH" >> /root/.bashrc
|
||||
|
||||
ADD . /pwndbg/
|
||||
|
||||
RUN git submodule update --init --recursive
|
||||
Loading…
Reference in new issue