From 15ba8c3fbc92c7ad82c567593eefd242300c9236 Mon Sep 17 00:00:00 2001 From: Mark Chen Date: Tue, 13 Feb 2024 08:37:27 +0800 Subject: [PATCH] update docker and workflow file --- .github/workflows/python-app-unit-tests.yml | 4 ++-- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app-unit-tests.yml b/.github/workflows/python-app-unit-tests.yml index 42e654e..0bb2edb 100644 --- a/.github/workflows/python-app-unit-tests.yml +++ b/.github/workflows/python-app-unit-tests.yml @@ -17,12 +17,12 @@ jobs: # Pull the latest version of the base image to ensure it's up to date - name: Pull latest base image - run: docker pull tiangolo/uvicorn-gunicorn-fastapi:python3.9 + run: docker pull ubuntu:20.04 # Build the Docker image, with caching of Docker layers - name: Build Docker image run: | - docker build -t fastapirepo . --cache-from tiangolo/uvicorn-gunicorn-fastapi:python3.9 + docker build -t fastapirepo . --cache-from ubuntu:20.04 # Run unit tests in the Docker container - name: Unit Tests diff --git a/Dockerfile b/Dockerfile index d0b6686..80e333d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,4 +39,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Copy your application source code and script COPY ./src /app -CMD ["uvicorn", "app.app.main:app", "--host", "0.0.0.0", "--port", "7860"] \ No newline at end of file +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] \ No newline at end of file