Skip to content

Commit

Permalink
refactor: make non-root user (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigpick authored Jul 31, 2024
1 parent 37769cb commit fbfac17
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
23 changes: 16 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,26 @@ RUN apt update && apt-get upgrade -y && apt install -y --no-install-recommends \
git \
python3 \
python3-psutil \
python3-pip \
python3-requests \
pciutils \
autossh \
jq \
curl && \
rm -rf /var/lib/apt/lists/*

CMD mkdir /root/htpclient

WORKDIR /root/htpclient
RUN groupadd -g 1001 hashtopolis-user && \
useradd -g 1001 -u 1001 -m hashtopolis-user -s /bin/bash && \
echo 'hashtopolis-user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
mkdir -p /home/hashtopolis-user/.ssh && \
chown -R hashtopolis-user:hashtopolis-user /home/hashtopolis-user/

RUN git clone https://github.com/hashtopolis/agent-python.git && \
cd agent-python && \
./build.sh && \
mv hashtopolis.zip ../ && \
cd ../ && rm -R agent-python
USER hashtopolis-user
WORKDIR /home/hashtopolis-user

#RUN git clone https://github.com/hashtopolis/agent-python.git && \
# cd agent-python && \
# ./build.sh && \
# mv hashtopolis.zip ../ && \
# cd ../ && rm -R agent-python
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.3
0.2.0

0 comments on commit fbfac17

Please sign in to comment.