Skip to content

Commit 9e553c7

Browse files
committed
Cleaned up docker image
1 parent e50a361 commit 9e553c7

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ COPY tox.ini /python-dev/tox.ini
4949
WORKDIR /python-dev
5050

5151
# allow interactive bash inside docker container
52-
CMD ./run_python.sh $API_KEY $FILENAME $ALT_URL $GIT_USERNAME $VERSION
52+
CMD ./run_python.sh
5353

5454
VOLUME ["/source"]

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Build the docker image, e.g. `docker build -t basistech/python:1.1 .`
99

1010
Run an example as `docker run -e API_KEY=api-key -v "path-to-local-python-dir:/source" basistech/python:1.1`
1111

12-
To test against a specific source file, add `-e FILENAME=filename` before the `-v`, to test against an alternate url, add `-e ALT_URL=alternate_url`, and optionally if you would like to regenerate gh-pages from the changes made to the development source you can add `-e GIT_USERNAME=git-username -e VERSION=version` before the `-v`. In order to push the gh-pages to git remember to mount .ssh and .gitconfig to the root dir `-v path-to-.ssh-dir:/root/.ssh -v path-to-.gitconfig:/root/.gitconfig`.
12+
To test against a specific source file, add `-e FILENAME=filename` before the `-v`, to test against an alternate url, add `-e ALT_URL=alternate_url`.

docker/run_python.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ function HELP {
1010
echo " API_KEY - Rosette API key (required)"
1111
echo " FILENAME - Python source file (optional)"
1212
echo " ALT_URL - Alternate service URL (optional)"
13-
echo " GIT_USERNAME - Git username where you would like to push regenerated gh-pages (optional)"
14-
echo " VERSION - Build version (optional)"
1513
echo "Compiles and runs the source file(s) using the local development source."
1614
exit 1
1715
}
@@ -69,7 +67,7 @@ function runExample() {
6967
#------------------ Functions End ------------------------------------------------
7068

7169
#Gets API_KEY, FILENAME and ALT_URL if present
72-
while getopts ":API_KEY:FILENAME:ALT_URL:GIT_USERNAME:VERSION" arg; do
70+
while getopts ":API_KEY:FILENAME:ALT_URL" arg; do
7371
case "${arg}" in
7472
API_KEY)
7573
API_KEY=${OPTARG}
@@ -80,12 +78,6 @@ while getopts ":API_KEY:FILENAME:ALT_URL:GIT_USERNAME:VERSION" arg; do
8078
FILENAME)
8179
FILENAME=${OPTARG}
8280
;;
83-
GIT_USERNAME)
84-
GIT_USERNAME=${OPTARG}
85-
;;
86-
VERSION)
87-
VERSION=${OPTARG}
88-
;;
8981
esac
9082
done
9183

0 commit comments

Comments
 (0)