From d18e52fa410d943c6cf8188d78415c4481de68da Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Wed, 23 Feb 2022 20:28:27 +0200 Subject: [PATCH] Pre-commit fixes. With the updated hooks, address some newly found issues: - Sort Python imports with isort. - Don't cache pip packages in the container image. --- Dockerfile | 2 +- app.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6ea58a6..ed2e783 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM registry.hub.docker.com/library/python:3.9-alpine3.14 WORKDIR /app COPY requirements.txt ./ -RUN pip install -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt COPY * ./ EXPOSE 8080 ENV FORWARDED_ALLOW_IPS "*" diff --git a/app.py b/app.py index a29922a..41e5e04 100644 --- a/app.py +++ b/app.py @@ -3,10 +3,10 @@ import json import os + import docker from flask import Flask, request - app = Flask(__name__) client = docker.from_env() -- GitLab