docker image improvs
This commit is contained in:
parent
01db97924e
commit
3500383e7d
3 changed files with 9 additions and 13 deletions
|
|
@ -2,9 +2,10 @@
|
|||
FROM python:3.11.7-slim-bullseye
|
||||
|
||||
# Install system dependencies required for building certain Python packages
|
||||
RUN apt-get update && apt-get install -y \
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||
gcc \
|
||||
curl wget libmagic-dev ffmpeg \
|
||||
libmagic-dev \
|
||||
ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set the working directory in the container to /app
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
FROM python:3.11.7-slim-bullseye
|
||||
|
||||
# Install system dependencies required for building certain Python packages
|
||||
RUN apt-get update && apt-get install -y \
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||
gcc \
|
||||
curl wget libmagic-dev ffmpeg supervisor \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
|
|
|||
15
Makefile
15
Makefile
|
|
@ -5,7 +5,6 @@ VERSION := $(shell grep -m1 version pyproject.toml | cut -d'"' -f2)
|
|||
IMAGE_NAME := lfnovo/open_notebook
|
||||
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
#,linux/arm/v7,linux/386
|
||||
|
||||
database:
|
||||
docker compose --profile db_only up
|
||||
|
|
@ -19,26 +18,22 @@ lint:
|
|||
ruff:
|
||||
ruff check . --fix
|
||||
|
||||
# Configuração do buildx para multi-plataforma
|
||||
# buildx config for multi-plataform
|
||||
docker-buildx-prepare:
|
||||
docker buildx create --use --name multi-platform-builder || true
|
||||
|
||||
# Build multi-plataforma com buildx
|
||||
# multi-plataform build with buildx
|
||||
docker-build: docker-buildx-prepare
|
||||
docker buildx build \
|
||||
docker buildx build --pull \
|
||||
--platform $(PLATFORMS) \
|
||||
-t $(IMAGE_NAME):$(VERSION) \
|
||||
--push \
|
||||
.
|
||||
|
||||
# O push já é feito durante o build com buildx
|
||||
docker-push:
|
||||
@echo "Push já foi realizado durante o build com buildx"
|
||||
|
||||
# Build e push combinados
|
||||
# Build and push combined
|
||||
docker-release: docker-build
|
||||
|
||||
# Comando útil para verificar as plataformas suportadas após o build
|
||||
# Check supported platforms
|
||||
docker-check-platforms:
|
||||
docker manifest inspect $(IMAGE_NAME):$(VERSION)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue