mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-02-05 22:53:23 +08:00
update with Cleanup Docker resources
This commit is contained in:
parent
28152eba1a
commit
faca3d23bb
10
.github/workflows/develop.yml
vendored
10
.github/workflows/develop.yml
vendored
@ -16,6 +16,9 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
|
- name: Cleanup Docker resources
|
||||||
|
if: always()
|
||||||
|
run: docker system prune -a -f --volumes
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@ -37,6 +40,9 @@ jobs:
|
|||||||
- name: Push image
|
- name: Push image
|
||||||
run: |
|
run: |
|
||||||
docker push ${{ env.IMAGE }}:latest
|
docker push ${{ env.IMAGE }}:latest
|
||||||
|
- name: Cleanup Docker resources
|
||||||
|
if: always()
|
||||||
|
run: docker system prune -a -f --volumes
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test Docker Image
|
name: Test Docker Image
|
||||||
@ -61,7 +67,9 @@ jobs:
|
|||||||
--tag ${{ env.IMAGE }}:latest \
|
--tag ${{ env.IMAGE }}:latest \
|
||||||
--file ./app/backend/Dockerfile.prod \
|
--file ./app/backend/Dockerfile.prod \
|
||||||
"./app/backend"
|
"./app/backend"
|
||||||
|
- name: Cleanup Docker resources
|
||||||
|
if: always()
|
||||||
|
run: docker system prune -a -f --volumes
|
||||||
- name: Run container
|
- name: Run container
|
||||||
run: |
|
run: |
|
||||||
docker run \
|
docker run \
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
###########
|
###########
|
||||||
|
|
||||||
# pull official base image
|
# pull official base image
|
||||||
FROM python:3.11-slim-bookworm as builder
|
FROM python:3.11-slim as builder
|
||||||
|
|
||||||
|
|
||||||
# set working directory
|
# set working directory
|
||||||
@ -36,7 +36,7 @@ RUN pipenv run pip install black==23.12.1 flake8==7.0.0 isort==5.13.2
|
|||||||
#########
|
#########
|
||||||
|
|
||||||
# pull official base image
|
# pull official base image
|
||||||
FROM python:3.11-slim-bookworm
|
FROM python:3.11-slim
|
||||||
|
|
||||||
# create directory for the app user
|
# create directory for the app user
|
||||||
RUN mkdir -p /home/app
|
RUN mkdir -p /home/app
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user