drakkan / sftpgo

Full-featured and highly configurable SFTP, HTTP/S, FTP/S and WebDAV server - S3, Google Cloud Storage, Azure Blob
https://sftpgo.com
GNU Affero General Public License v3.0
9.32k stars 728 forks source link

Phasing out Docker Distroless variant #1295

Closed drakkan closed 1 year ago

drakkan commented 1 year ago

Hello,

since Docker Distroless variant is useful to a limit group of users, we decided to phase it out. This step aims to streamline maintenance and expedite the development of new features. Consequently, the Distroless variant will be removed from our public repo in the near future and therefore will no longer receive updates on Docker Hub and GitHub Container Registry.

If you still require the Distroless variant, please inform us at support at sftpgo dot com. We can consider offering this variant under our new support plans, details of which can be found at https://www.sftpgo.com#pricing. Thank you

dlehammer commented 1 year ago

Hi @drakkan,

Which image is the recommended substitute, perhaps alpine-slim, when migrating from distroless-slim ?

EDIT: The reason I'm asking; is when I attempted to migrate from: v2.5.1-distroless-slim to: v2.5.2-alpine-slim the result was an endless restart loop:

2023-06-18T21:19:35.981 WRN Unable to initialize data provider: file is not a database
2023-06-18T21:19:35.981 ERR error initializing data provider: file is not a database
2023-06-18T21:19:49.622 INF creating initial database schema, version 23
2023-06-18T21:19:49.625 WRN Unable to initialize data provider: file is not a database
2023-06-18T21:19:49.625 ERR error initializing data provider: file is not a database

My docker-compose is unchanged, besides the image reference, in the above scenario. I've rolled back until I have time to analyse why the alpine-slim image isn't compatible with the distroless-slim.

( I was utilizing that image privately on a Pi, chosen based on the assumed limited attack surface and small size 🤓 )

drakkan commented 1 year ago

Hi @drakkan,

Which image is the recommended substitute, perhaps alpine-slim, when migrating from distroless-slim ?

EDIT: The reason I'm asking; is when I attempted to migrate from: v2.5.1-distroless-slim to: v2.5.2-alpine-slim the result was an endless restart loop:

2023-06-18T21:19:35.981 WRN Unable to initialize data provider: file is not a database
2023-06-18T21:19:35.981 ERR error initializing data provider: file is not a database
2023-06-18T21:19:49.622 INF creating initial database schema, version 23
2023-06-18T21:19:49.625 WRN Unable to initialize data provider: file is not a database
2023-06-18T21:19:49.625 ERR error initializing data provider: file is not a database

My docker-compose is unchanged, besides the image reference, in the above scenario. I've rolled back until I have time to analyse why the alpine-slim image isn't compatible with the distroless-slim.

( I was utilizing that image privately on a Pi, chosen based on the assumed limited attack surface and small size nerd_face )

alpine-slim is the closer alternative. The distroless image used bolt as data provider (because sftpgo was compiled statically), other variants use sqlite by default. You have to set the data provider to bolt to reuse the existing database

dlehammer commented 1 year ago

Hi @drakkan,

Thanks for taking the time to reply.

I've done a bit of digging, my changes are inspired by this suggestion pointing towards the bolt test-setup.

The below changes to my docker-compose allowed me to migrate successfully:

     environment:
+      SFTPGO_DATA_PROVIDER__DRIVER: 'bolt'
+      SFTPGO_DATA_PROVIDER__NAME: 'sftpgo.db'
-    image: 'drakkan/sftpgo:v2.5.1-distroless-slim'
+    image: 'drakkan/sftpgo:v2.5.2-alpine-slim'

:nerd_face: