From fe1cc3c01ee733d726d8fe80476805e05639863e Mon Sep 17 00:00:00 2001 From: Jash Parekh Date: Sat, 18 Dec 2021 12:59:38 -0500 Subject: [PATCH] Fix docker command --- Dockerfile | 8 +------- plugin_scripts/__init__.py | 4 ++++ plugin_scripts/__main__.py | 4 ---- plugin_scripts/deploy.py | 1 + 4 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 plugin_scripts/__main__.py diff --git a/Dockerfile b/Dockerfile index 0148709..0bdf026 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,6 @@ WORKDIR /app # We are installing a dependency here directly into our app source dir RUN pip install --target=/app -r plugin_scripts/requirements.lock - -# A distroless container image with Python and some basics like SSL certificates -# https://github.com/GoogleContainerTools/distroless -FROM gcr.io/distroless/python3-debian10 -COPY --from=builder /app/plugin_scripts /app/plugin_scripts -WORKDIR /app ENV PYTHONPATH /app -CMD ["/app/plugin_scripts/__init__.py"] +CMD ["python", "/app/plugin_scripts/__init__.py"] diff --git a/plugin_scripts/__init__.py b/plugin_scripts/__init__.py index e69de29..fa5f3b1 100644 --- a/plugin_scripts/__init__.py +++ b/plugin_scripts/__init__.py @@ -0,0 +1,4 @@ +from plugin_scripts.deploy import main + +if __name__ == "__main__": + main() diff --git a/plugin_scripts/__main__.py b/plugin_scripts/__main__.py deleted file mode 100644 index 6133dd7..0000000 --- a/plugin_scripts/__main__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .deploy import main - -if __name__ == "__main__": - main() diff --git a/plugin_scripts/deploy.py b/plugin_scripts/deploy.py index e5b38c9..f127737 100755 --- a/plugin_scripts/deploy.py +++ b/plugin_scripts/deploy.py @@ -60,6 +60,7 @@ def _deploy(): def main(): + print('hi') _validate_env_variables() if _validate_if_path_exists(): _deploy()