Skip to content

Commit

Permalink
adjusted docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Voronenko committed May 27, 2019
1 parent 3cbac56 commit 07e3d43
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM debian:stretch

ADD build/trafficmirror /trafficmirror
ADD ./init.sh /init
RUN chmod +x /init

CMD ["trafficmirror"]
CMD ["/init"]

EXPOSE 8080
8 changes: 8 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

LISTEN_PORT=${LISTEN_PORT:-7077}
MAIN=${MAIN:-localhost:8888}
EXTRA_PARAMS=$1

echo /trafficmirror /trafficmirror -listen ":${LISTEN_PORT}" -main=${MAIN} $EXTRA_PARAMS
/trafficmirror -listen ":${LISTEN_PORT}" -main=${MAIN} $EXTRA_PARAMS

0 comments on commit 07e3d43

Please sign in to comment.