Moved to python image

This commit is contained in:
2020-10-20 10:42:53 +02:00
parent 96d86388ed
commit 68af7a3b20
2 changed files with 5 additions and 6 deletions

View File

@@ -1,7 +1,6 @@
FROM alpine:3.12 FROM python:3
RUN apk update && apk add --no-cache bash git openssh python3 py3-pip graphviz gcc
RUN python3 -m pip install --upgrade pip setuptools wheel pyparsing pydot django-extensions django RUN python -m pip install --upgrade pip setuptools wheel pyparsing pydot django-extensions django
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# e is for exiting the script automatically if a command fails, u is for exiting if a variable is not set # e is for exiting the script automatically if a command fails, u is for exiting if a variable is not set
# x would be for showing the commands before they are executed # x would be for showing the commands before they are executed
set -eu set -eux
# FUNCTIONS # FUNCTIONS
# Function for setting up git env in the docker container (copied from https://github.com/stefanzweifel/git-auto-commit-action/blob/master/entrypoint.sh) # Function for setting up git env in the docker container (copied from https://github.com/stefanzweifel/git-auto-commit-action/blob/master/entrypoint.sh)
@@ -27,10 +27,10 @@ _git_changed() {
# PROGRAM # PROGRAM
echo "Installing dependencies..." echo "Installing dependencies..."
pip3 install --no-cache-dir -r $INPUT_PIP_PATH pip install --no-cache-dir -r $INPUT_PIP_PATH
echo "Creating data model..." echo "Creating data model..."
cd $INPUT_PROJECT_PATH cd $INPUT_PROJECT_PATH
python3 manage.py graph_models -a -g -o $INPUT_OUTPUT_PATH python manage.py graph_models -a -g -o $INPUT_OUTPUT_PATH
# To keep runtime good, just continue if something was changed # To keep runtime good, just continue if something was changed
if _git_changed; if _git_changed;