Compare commits
2 Commits
ed31225d4d
...
05070d7d54
| Author | SHA1 | Date | |
|---|---|---|---|
| 05070d7d54 | |||
| de468929e1 |
@@ -1,11 +0,0 @@
|
||||
.git
|
||||
.agents
|
||||
.codex
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
.pytest_cache
|
||||
.DS_Store
|
||||
docker-run-commands.sh
|
||||
manager-solution/__pycache__
|
||||
manager-solution/manager/__pycache__
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
maschera.zip
|
||||
fiscality-installer.zip
|
||||
17
Dockerfile
17
Dockerfile
@@ -11,12 +11,10 @@ RUN mkdir -p /app /defaults \
|
||||
RUN ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime && \
|
||||
echo "Europe/Rome" > /etc/timezone
|
||||
|
||||
# The base image may include third-party apt repositories, but this image only
|
||||
# needs Debian packages. Disable inherited repos so stale keys cannot break apt.
|
||||
# The base image may include Docker's apt repository, but this image does not
|
||||
# install Docker packages. Disable it so apt updates do not fail on stale keys.
|
||||
RUN rm -f /etc/apt/sources.list.d/docker.list \
|
||||
/etc/apt/sources.list.d/download_docker_com_linux_debian.list \
|
||||
/etc/apt/sources.list.d/nodesource.list \
|
||||
/etc/apt/sources.list.d/nodesource.list.save
|
||||
/etc/apt/sources.list.d/download_docker_com_linux_debian.list
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
@@ -39,8 +37,7 @@ RUN apt-get update && \
|
||||
&& sed -i 's/# it_IT.UTF-8 UTF-8/it_IT.UTF-8 UTF-8/' /etc/locale.gen \
|
||||
&& locale-gen it_IT.UTF-8 \
|
||||
&& update-locale LANG=it_IT.UTF-8 LC_ALL=it_IT.UTF-8 \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# --- Install Microsoft core fonts (Arial, Times New Roman, Courier New, etc.) ---
|
||||
@@ -49,7 +46,8 @@ RUN set -eux; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
fontconfig \
|
||||
cabextract \
|
||||
xfonts-utils; \
|
||||
xfonts-utils \
|
||||
gnupg; \
|
||||
\
|
||||
sed -i 's/ main$/ main contrib/g' /etc/apt/sources.list; \
|
||||
apt-get update; \
|
||||
@@ -58,8 +56,7 @@ RUN set -eux; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ttf-mscorefonts-installer; \
|
||||
\
|
||||
fc-cache -f -v; \
|
||||
apt-get clean; \
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
|
||||
|
||||
33
install.sh
33
install.sh
@@ -12,7 +12,6 @@ SKIP_BUILD="${SKIP_BUILD:-0}"
|
||||
SKIP_MANAGER_BUILD="${SKIP_MANAGER_BUILD:-0}"
|
||||
PULL_APP_IMAGE="${PULL_APP_IMAGE:-0}"
|
||||
PULL_MANAGER_IMAGE="${PULL_MANAGER_IMAGE:-0}"
|
||||
MIN_DOCKER_FREE_MB="${MIN_DOCKER_FREE_MB:-8192}"
|
||||
|
||||
echo "Project root: ${ROOT_DIR}"
|
||||
echo "Manager dir: ${MANAGER_DIR}"
|
||||
@@ -33,37 +32,6 @@ ensure_image_exists() {
|
||||
fi
|
||||
}
|
||||
|
||||
check_docker_free_space() {
|
||||
local docker_root
|
||||
docker_root="$(docker info -f '{{.DockerRootDir}}' 2>/dev/null || true)"
|
||||
if [[ -z "${docker_root}" || ! -d "${docker_root}" ]]; then
|
||||
echo "Could not determine Docker root directory. Is Docker running?" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local available_kb available_mb
|
||||
available_kb="$(df -Pk "${docker_root}" | awk 'NR == 2 {print $4}')"
|
||||
available_mb=$((available_kb / 1024))
|
||||
|
||||
echo "Docker root: ${docker_root} (${available_mb} MB free)"
|
||||
if (( available_mb < MIN_DOCKER_FREE_MB )); then
|
||||
cat >&2 <<EOF
|
||||
Not enough free space in Docker storage to build reliably.
|
||||
Need at least ${MIN_DOCKER_FREE_MB} MB free; found ${available_mb} MB.
|
||||
|
||||
Run:
|
||||
docker builder prune -f
|
||||
docker image prune -f
|
||||
docker container prune -f
|
||||
|
||||
Then check:
|
||||
docker system df
|
||||
df -h ${docker_root}
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ -n "${APP_IMAGE_ARCHIVE}" ]]; then
|
||||
echo "Loading prebuilt app image from ${APP_IMAGE_ARCHIVE}"
|
||||
docker load -i "${APP_IMAGE_ARCHIVE}"
|
||||
@@ -71,7 +39,6 @@ elif [[ "${PULL_APP_IMAGE}" == "1" ]]; then
|
||||
echo "Pulling app image ${APP_IMAGE_NAME}"
|
||||
docker pull "${APP_IMAGE_NAME}"
|
||||
elif [[ "${SKIP_BUILD}" != "1" ]]; then
|
||||
check_docker_free_space
|
||||
echo "Building app image ${APP_IMAGE_NAME}"
|
||||
docker build -t "${APP_IMAGE_NAME}" "${ROOT_DIR}"
|
||||
else
|
||||
|
||||
Binary file not shown.
BIN
maschera.zip
Normal file
BIN
maschera.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user