Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ARG BASE_IMAGE=python:alpine
FROM $BASE_IMAGE

RUN apk add --no-cache bash

RUN mkdir /code

COPY docker-entrypoint.sh /code
COPY src/wsdd.py /code

CMD [ "/code/docker-entrypoint.sh"]
25 changes: 25 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

args=

if [ ! -z "${WSDD_ARGS}" ]; then
args=${WSDD_ARGS}
else
if [ ! -z "${HOSTNAME}" ]; then
args+="-n $HOSTNAME "
else
echo "HOSTNAME environment variable must be set."
exit 1
fi

if [ ! -z "${WORKGROUP}" ]; then
args+="-w $WORKGROUP "
fi

if [ ! -z "${DOMAIN}" ]; then
args+="-d $DOMAIN "
fi
fi

exec python /code/wsdd.py ${args}