tweaking, hardening

This commit is contained in:
Marco Ochse
2018-03-30 20:54:44 +00:00
parent 594361a056
commit 5c403a5cce
7 changed files with 40 additions and 27 deletions

View File

@ -1,23 +1,32 @@
FROM alpine
MAINTAINER MO
# Setup env and apt
RUN apk -U upgrade && \
apk add bash build-base git nodejs nodejs-npm openssh-client python procps && \
apk add bash \
build-base \
git \
nodejs \
nodejs-npm \
openssh-client \
python \
procps && \
# Setup user
addgroup -g 2000 wetty && \
adduser -S -s /bin/bash -u 2000 -D -g 2000 wetty && \
# Get and install packages
mkdir -p /app/ && \
cd /app/ && \
mkdir -p /opt/ && \
cd /opt/ && \
npm install https://github.com/t3chn0m4g3/wetty && \
# Clean up
apk del build-base git nodejs-npm python
apk del --purge build-base \
git \
nodejs-npm \
python
# Start elasticsearch-head
WORKDIR /app
USER wetty
CMD /usr/bin/node /app/node_modules/wetty/app.js -p 64300 --host 127.0.0.1 --sshhost 127.0.0.1 --sshport 64295 --sshuser $MY_SSHUSER
WORKDIR /opt
USER wetty:wetty
CMD /usr/bin/node /opt/node_modules/wetty/app.js -p 64300 --host 127.0.0.1 --sshhost 127.0.0.1 --sshport 64295 --sshuser $MY_SSHUSER

View File

@ -6,9 +6,11 @@ services:
# Wetty service
wetty:
build: .
container_name: wetty
restart: always
network_mode: "host"
env_file:
- /opt/tpot/etc/compose/wetty_environment
image: "dtagdevsec/wetty:1710"
image: "dtagdevsec/wetty:1804"
read_only: true