From 026ac7e4f0480a1a7b05a3a2b57a7b2bd62ba2f6 Mon Sep 17 00:00:00 2001 From: Carbrex <95964955+Carbrex@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:38:03 +0000 Subject: [PATCH] Made an attempt to make docker images lighter. (#68) --- docker/lila-fishnet.Dockerfile | 2 +- docker/lila-search.Dockerfile | 2 +- docker/lila-ws.Dockerfile | 2 +- docker/lila.Dockerfile | 2 +- docker/picfit.Dockerfile | 11 ++--------- docker/ui.Dockerfile | 4 +++- lila-docker | 1 + 7 files changed, 10 insertions(+), 14 deletions(-) diff --git a/docker/lila-fishnet.Dockerfile b/docker/lila-fishnet.Dockerfile index 53c72a14..78f151c7 100644 --- a/docker/lila-fishnet.Dockerfile +++ b/docker/lila-fishnet.Dockerfile @@ -1,4 +1,4 @@ -FROM sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.2_13_1.9.9_3.4.0 +FROM sbtscala/scala-sbt:eclipse-temurin-alpine-21.0.2_13_1.9.9_3.4.0 ENV CONFIG_FORCE_kamon_influxdb_authentication_token="secret" ENV CONFIG_FORCE_kamon_influxdb_hostname="influxdb" diff --git a/docker/lila-search.Dockerfile b/docker/lila-search.Dockerfile index a75cd49b..1a91b283 100644 --- a/docker/lila-search.Dockerfile +++ b/docker/lila-search.Dockerfile @@ -1,4 +1,4 @@ -FROM sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.2_13_1.9.9_2.13.13 +FROM sbtscala/scala-sbt:eclipse-temurin-alpine-21.0.2_13_1.9.9_2.13.13 WORKDIR /lila-search diff --git a/docker/lila-ws.Dockerfile b/docker/lila-ws.Dockerfile index 99622649..aa3698e1 100644 --- a/docker/lila-ws.Dockerfile +++ b/docker/lila-ws.Dockerfile @@ -1,4 +1,4 @@ -FROM sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.2_13_1.9.9_3.4.0 +FROM sbtscala/scala-sbt:eclipse-temurin-alpine-21.0.2_13_1.9.9_3.4.0 WORKDIR /lila-ws diff --git a/docker/lila.Dockerfile b/docker/lila.Dockerfile index 6e43a622..3b70b82a 100644 --- a/docker/lila.Dockerfile +++ b/docker/lila.Dockerfile @@ -1,4 +1,4 @@ -FROM sbtscala/scala-sbt:eclipse-temurin-jammy-21.0.2_13_1.9.9_3.4.0 +FROM sbtscala/scala-sbt:eclipse-temurin-alpine-21.0.2_13_1.9.9_3.4.0 WORKDIR /lila diff --git a/docker/picfit.Dockerfile b/docker/picfit.Dockerfile index e8bde8a4..f011b938 100644 --- a/docker/picfit.Dockerfile +++ b/docker/picfit.Dockerfile @@ -1,13 +1,6 @@ -FROM golang:1.22.1-alpine3.19 - -RUN apk --no-cache add git make +FROM carbrex/thoas-picfit:latest COPY assets/coach.png /uploads/coach.png COPY assets/streamer.png /uploads/streamer.png -WORKDIR /opt - -RUN git clone --depth 1 https://github.com/thoas/picfit.git -RUN make -C /opt/picfit build - -ENTRYPOINT /opt/picfit/bin/picfit -c /mnt/config.json +ENTRYPOINT ["/picfit", "-c", "/mnt/config.json"] \ No newline at end of file diff --git a/docker/ui.Dockerfile b/docker/ui.Dockerfile index 09aa9572..743be10b 100644 --- a/docker/ui.Dockerfile +++ b/docker/ui.Dockerfile @@ -1,4 +1,6 @@ -FROM node:20.11.1-bookworm +FROM node:20.11.1-bookworm-slim + +RUN apt update && apt install -y git && apt clean RUN git config --global --add safe.directory /chessground RUN git config --global --add safe.directory /lila diff --git a/lila-docker b/lila-docker index 6978e1b0..b159c07c 100755 --- a/lila-docker +++ b/lila-docker @@ -6,6 +6,7 @@ run_setup() { docker compose build docker compose --profile utils build docker compose up -d + run_ui_build --update setup_bbppairings