maurosoria / dirsearch

Web path scanner
11.93k stars 2.31k forks source link

Docker container cannot run due to permission issues inside the container. #1314

Closed AgainstTheLight closed 10 months ago

AgainstTheLight commented 1 year ago

What is the current behavior?

What actually happens?

What is the expected behavior?

What it should be instead?

Any additional information?

Screenshots, dirsearch log, dirsearch version, used command, ...?

AgainstTheLight commented 1 year ago

What is the current behavior?

docker Version: 1.13.1 API version: 1.26 Go version: go1.10.3

I get a tips from deamon

/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:290: starting container process caused "exec: \"./dirsearch.py\": permission denied".

What is the expected behavior?

After building the container, it can run normally.

Any additional information

none

AgainstTheLight commented 1 year ago

I solved this problem by modifying the Dockerfile.

FROM python:3-alpine
LABEL maintainer="maurosoria@protonmail.com"

WORKDIR /root/
ADD . /root/

RUN apk add \
    gcc \
    musl-dev \
    libffi-dev \
    openssl-dev \
    libffi-dev

RUN pip install -r requirements.txt

RUN  chmod +x dirsearch.py

ENTRYPOINT ["./dirsearch.py"]
CMD ["--help"]