mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-24 01:25:37 +01:00
Merge pull request #135 from calebstewart/issue-134-dockerhub-builds-failing
- Pinned Alpine to 3.13.5 in Dockerfile - Installed pwncat within a virtual environment at /opt/pwncat inside the container
This commit is contained in:
commit
5f18ed48c6
@ -8,11 +8,12 @@ The Changelog starts with v0.4.1, because we did not keep one before that,
|
||||
and simply didn't have the time to go back and retroactively create one.
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- Pinned container base image to alpine 3.13.5 and installed to virtualenv ([#134](https://github.com/calebstewart/pwncat/issues/134))
|
||||
- Fixed syntax for f-strings in escalation command
|
||||
### Changed
|
||||
- Changed session tracking so session IDs aren't reused
|
||||
- Changed zsh prompt to match CWD of other shell prompts
|
||||
### Fixed
|
||||
- Fixed syntax for f-strings in escalation command
|
||||
|
||||
## [0.4.2] - 2021-06-15
|
||||
Quick patch release due to corrected bug in `ChannelFile` which caused command
|
||||
|
31
Dockerfile
31
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM alpine:latest as builder
|
||||
FROM alpine:3.13.5 as builder
|
||||
|
||||
# Install python3 and development files
|
||||
RUN set -eux \
|
||||
@ -12,29 +12,27 @@ RUN set -eux \
|
||||
musl-dev \
|
||||
cargo
|
||||
|
||||
# Install pip
|
||||
RUN set -eux \
|
||||
&& python3 -m ensurepip
|
||||
|
||||
# Ensure pip is up to date
|
||||
RUN set -eux \
|
||||
&& python3 -m pip install -U pip setuptools wheel setuptools_rust
|
||||
|
||||
# Copy pwncat source
|
||||
COPY . /pwncat
|
||||
|
||||
# Setup virtual environment
|
||||
RUN set -eux \
|
||||
&& python3 -m venv /opt/pwncat \
|
||||
&& /opt/pwncat/bin/python -m ensurepip \
|
||||
&& /opt/pwncat/bin/python -m pip install -U pip setuptools wheel setuptools_rust
|
||||
|
||||
# Setup pwncat
|
||||
RUN set -eux \
|
||||
&& cd /pwncat \
|
||||
&& python3 setup.py install
|
||||
&& /opt/pwncat/bin/python setup.py install
|
||||
|
||||
# Cleanup
|
||||
RUN set -eux \
|
||||
&& find /usr/lib -type f -name '*.pyc' -print0 | xargs -0 -n1 rm -rf || true \
|
||||
&& find /usr/lib -type d -name '__pycache__' -print0 | xargs -0 -n1 rm -rf || true
|
||||
&& find /opt/pwncat/lib -type f -name '*.pyc' -print0 | xargs -0 -n1 rm -rf || true \
|
||||
&& find /opt/pwncat/lib -type d -name '__pycache__' -print0 | xargs -0 -n1 rm -rf || true
|
||||
|
||||
|
||||
FROM alpine:latest as final
|
||||
FROM alpine:3.13.5 as final
|
||||
|
||||
RUN set -eux \
|
||||
&& apk add --no-cache \
|
||||
@ -43,11 +41,10 @@ RUN set -eux \
|
||||
&& find /usr/lib -type d -name '__pycache__' -print0 | xargs -0 -n1 rm -rf || true \
|
||||
&& mkdir /work
|
||||
|
||||
COPY --from=builder /usr/bin/pwncat /usr/bin/pwncat
|
||||
COPY --from=builder /usr/lib/python3.8 /usr/lib/python3.8
|
||||
COPY --from=builder /opt/pwncat /opt/pwncat
|
||||
|
||||
RUN python3 -m pwncat --download-plugins
|
||||
RUN /opt/pwncat/bin/python -m pwncat --download-plugins
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /work
|
||||
ENTRYPOINT ["/usr/bin/pwncat"]
|
||||
ENTRYPOINT ["/opt/pwncat/bin/pwncat"]
|
||||
|
Loading…
Reference in New Issue
Block a user