Skip to content

Commit

Permalink
Merge pull request #16 from RyosukeDTomita/hostfix/cannot-use-syn-sca…
Browse files Browse the repository at this point in the history
…n-with-docker

tmp: use root
  • Loading branch information
RyosukeDTomita authored Aug 18, 2024
2 parents fa2914e + 5f6c35c commit 659a8ea
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,23 @@ LABEL version="${VERSION}" \

WORKDIR /app

ARG USER_NAME="root"
# FIXME: コンテナ内でsynパケットを生成するのに管理者権限が必要なので暫定対応
# create execution user
ARG USER_NAME="sigma"
RUN <<EOF
echo 'Creating ${USER_NAME} group.'
addgroup ${USER_NAME}
echo 'Creating ${USER_NAME} user.'
adduser --ingroup ${USER_NAME} --gecos "my_portscanner user" --shell /bin/bash --no-create-home --disabled-password ${USER_NAME}
EOF
# ARG USER_NAME="sigma"
# RUN <<EOF
# echo 'Creating ${USER_NAME} group.'
# addgroup ${USER_NAME}
# echo 'Creating ${USER_NAME} user.'
# adduser --ingroup ${USER_NAME} --gecos "my_portscanner user" --shell /bin/bash --no-create-home --disabled-password ${USER_NAME}
# EOF

COPY --from=devcontainer --chown=${USER_NAME}:${USER_NAME} ["/app/dist/my_portscanner-${VERSION}-py3-none-any.whl", "/app/dist/my_portscanner-${VERSION}-py3-none-any.whl"]

RUN <<EOF
python3 -m pip install /app/dist/my_portscanner-${VERSION}-py3-none-any.whl
EOF

USER ${USER_NAME}
#USER ${USER_NAME}

ENTRYPOINT ["my_portscanner"]

0 comments on commit 659a8ea

Please sign in to comment.