Closed Carbrex closed 7 months ago
Looking great, thanks! Yeah if you want to split out the updates to the node-based images, those could be merged.
I think the only node based image is the ui
one. You can just copy paste the changes from this pr I dont think we need a pr for that.
Reduced the size of picfit image in this commit but the image build process downloads 1GB data. So, I uploaded this image on docker and now the build time is reduced pretty much. Either we can use it carbrex/thoas-picfit:latest as it is or upload on docker hub under lichess and then use it?
# Build stage
FROM golang:1.22.1-alpine3.19 AS build
RUN apk --no-cache add git make
WORKDIR /opt
RUN git clone --depth 1 https://github.com/thoas/picfit.git
RUN make -C /opt/picfit build
# Runtime stage
FROM alpine:3.19
COPY --from=build /opt/picfit/bin/picfit /picfit
ENTRYPOINT ["/picfit"]
Before: After:
Changes:
lila-docker-picfit:
1.39GB -> 50.3MB
lila-docker-lila_fishnet:
977MB->792MB
lila-docker-lila:
977MB->792MB
lila-docker-lila_ws:
977MB->792MB
lila-docker-lila_search:
945MB->760MB
lila-docker-ui:
1.12GB->347MB
@Carbrex it looks like thoas/picfit
has started updating their docker hub image again with the latest release. Could we use that as the base image?
@Carbrex it looks like
thoas/picfit
has started updating their docker hub image again with the latest release. Could we use that as the base image?
Yes, I saw that but it only supports arm for now. I have filed an issue on github, we can wait for it to get resolved. https://github.com/thoas/picfit/issues/192
I'm OK to merge now if it's ready?
We can use your hosted image for now. At some point maybe we can move it to be hosted by ghcr, like I'm doing with https://github.com/lichess-org/lila-docker/pull/62
Its ready.
Nice improvement, thanks!
I have made changes to some docker files to reduce their size. You dont need to merge this. I was just trying to reduce the size you can incorporate the changes you want.
These are the comparisons before and after changes:
Before changes:
docker images
docker stats
After changes:
docker images
docker stats
To make an sbt image for alpine I took this https://github.com/buildo/scala-sbt-alpine/blob/master/Dockerfile and made some changes to this. It works just fine and lila and lila-fishnet work fine too. I think the ui.Dockerfile can be taken as it is. It works well with chessground and pgn-viewer also.