Skip to content

Commit

Permalink
add entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Moser committed Apr 9, 2018
1 parent 98dda57 commit 57a774c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ VOLUME /config
RUN mkdir /data
VOLUME /data

ADD entrypoint.sh /usr/bin/entrypoint.sh

ENTRYPOINT ["entrypoint.sh"]

CMD ["ora2pg", "--debug", "-c", "/config/ora2pg.conf"]
19 changes: 19 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

if [ "$1" = 'ora2pg' ]; then

if [ -z "$2" ]; then
echo "INFO: no args provided. Using default: '--debug -c /config/ora2pg.conf'"
ora2pg --debug -c /config/ora2pg.conf

else
echo "INFO: executing: '$@'"
exec "$@"

fi

exit 0

fi

exec "$@"

0 comments on commit 57a774c

Please sign in to comment.