Skip to content

Commit

Permalink
Merge eddd0ca into eafaa68
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chn0m4g3 committed Mar 3, 2020
2 parents eafaa68 + eddd0ca commit 40d60b9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
15 changes: 9 additions & 6 deletions docker/phpox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM alpine

FROM alpine:3.10
#
# Include dist
ADD dist/ /root/dist/

#
# Install packages
RUN apk -U --no-cache add \
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U --no-cache add \
build-base \
file \
git \
Expand All @@ -15,7 +16,7 @@ RUN apk -U --no-cache add \
python3 \
python3-dev \
re2c && \
pip3 install --no-cache-dir --upgrade pip && \
#
# Install bfr sandbox from git
git clone --depth=1 https://github.com/mushorg/BFR /opt/BFR && \
cd /opt/BFR && \
Expand All @@ -28,20 +29,22 @@ RUN apk -U --no-cache add \
cd / && \
rm -rf /opt/BFR /tmp/* /var/tmp/* && \
echo "zend_extension = "$(find /usr -name bfr.so) >> /etc/php7/php.ini && \
#
# Install PHP Sandbox
git clone --depth=1 https://github.com/mushorg/phpox /opt/phpox && \
cd /opt/phpox && \
cp /root/dist/sandbox.py . && \
pip3 install -r requirements.txt && \
make && \
#
# Clean up
apk del --purge build-base \
git \
php7-dev \
python3-dev && \
rm -rf /root/* && \
rm -rf /var/cache/apk/*

#
# Set workdir and start phpsandbox
USER nobody:nobody
WORKDIR /opt/phpox
Expand Down
5 changes: 3 additions & 2 deletions docker/redis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ FROM redis:alpine
ADD dist/ /root/dist/

# Setup apt
RUN apk -U --no-cache add redis && \
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U --no-cache add redis && \
cp /root/dist/redis.conf /etc && \
# Clean up
rm -rf /root/* && \
rm -rf /tmp/* /var/tmp/* && \
rm -rf /var/cache/apk/*

# Start conpot
# Start redis
USER nobody:nobody
CMD redis-server /etc/redis.conf
9 changes: 5 additions & 4 deletions docker/tanner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM alpine
FROM alpine:3.10

# Include dist
ADD dist/ /root/dist/

# Setup apt
RUN apk -U --no-cache add \
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U --no-cache add \
build-base \
git \
libcap \
Expand All @@ -18,7 +19,7 @@ RUN apk -U --no-cache add \
git clone --depth=1 https://github.com/mushorg/tanner /opt/tanner && \
cp /root/dist/config.py /opt/tanner/tanner/ && \
cd /opt/tanner/ && \
pip3 install --no-cache-dir --upgrade pip setuptools && \
pip3 install --no-cache-dir setuptools && \
pip3 install --no-cache-dir -r requirements.txt && \
python3 setup.py install && \
cd / && \
Expand All @@ -33,7 +34,7 @@ RUN apk -U --no-cache add \
rm -rf /tmp/* /var/tmp/* && \
rm -rf /var/cache/apk/*

# Start conpot
# Start tanner
USER nobody:nobody
WORKDIR /opt/tanner
CMD tanner
5 changes: 3 additions & 2 deletions docker/tanner/dist/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
'TANNER': {'host': '0.0.0.0', 'port': 8090},
'WEB': {'host': '0.0.0.0', 'port': 8091},
'API': {'host': '0.0.0.0', 'port': 8092},
'API': {'host': '0.0.0.0', 'port': 8092, 'auth': False, 'auth_signature': 'tanner_api_auth'},
'PHPOX': {'host': 'tanner_phpox', 'port': 8088},
'REDIS': {'host': 'tanner_redis', 'port': 6379, 'poolsize': 80, 'timeout': 1},
'EMULATORS': {'root_dir': '/tmp/tanner/emulators'},
Expand All @@ -33,7 +33,8 @@
'LOCALLOG': {'enabled': False, 'PATH': '/tmp/tanner_report.json'},
'CLEANLOG': {'enabled': False},
'REMOTE_DOCKERFILE': {'GITHUB': "https://raw.githubusercontent.com/mushorg/tanner/master/docker/"
"tanner/template_injection/Dockerfile"}
"tanner/template_injection/Dockerfile"},
'SESSIONS': {"delete_timeout": 300}
}


Expand Down

0 comments on commit 40d60b9

Please sign in to comment.