Seafile : build your own images

This commit is contained in:
Gitouche 2022-03-05 20:41:45 +01:00
parent 20e9c3bacc
commit 93937d71fb
3 changed files with 27 additions and 2 deletions

View file

@ -34,7 +34,8 @@ export memcached_release
export listen_if
export listen_port
podman pull docker.io/seafileltd/seafile-mc:${seafile_release} &&
source ${ABSDIR}/zz_build-images.sh
podman image exists ${seafile_image}:${seafile_release} &&
podman pull docker.io/library/memcached:${memcached_release} &&
podman pull docker.io/library/mariadb:${mariadb_release} &&
podman-compose up -d &&

View file

@ -4,6 +4,7 @@ pod_name='podman-seafile'
service_name="pod-${pod_name}.service"
mariadb_release='10.3'
memcached_release='1.6'
seafile_image='localhost/seafileltd/seafile-mc'
seafile_release='8.0.8'
dbvolume='podman-seafile_seafile-db'
datavolume='podman-seafile_seafile-data'
@ -14,4 +15,4 @@ GARBAYE_SEAFILE_SERVER_HOSTNAME="${GARBAYE_SEAFILE_ENV_SERVER_HOSTNAME:-seafile.
GARBAYE_SEAFILE_ADMIN_PASSWORD="${GARBAYE_SEAFILE_ENV_ADMIN_PASSWORD:-asecret}"
GARBAYE_SEAFILE_ADMIN_EMAIL="${GARBAYE_SEAFILE_ENV_ADMIN_EMAIL:-laposte-seafile@garbaye.fr}"
envvars='GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD'
upstream_images="docker.io/seafileltd/seafile-mc docker.io/library/mariadb docker.io/library/memcached"
upstream_images="${seafile_image} docker.io/library/mariadb docker.io/library/memcached"

View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
source ${ABSDIR}/../functions.sh
source ${ABSDIR}/vars.sh
ensure_pwd_is_scriptdir
ensure_not_root
buildfolder=/tmp/seafile-$$
if ! podman image exists ${seafile_image}:${seafile_release}; then
mkdir ${buildfolder} &&
git clone --depth=1 https://github.com/haiwen/seafile-docker.git ${buildfolder}/ &&
sed_in_place "^FROM phusion/baseimage:focal-1.0.0" "FROM docker.io/phusion/baseimage:focal-1.0.0" ${buildfolder}/image/seafile_8.0/Dockerfile &&
sed_in_place "SEAFILE_VERSION=" "SEAFILE_VERSION=${seafile_release}" ${buildfolder}/image/seafile_8.0/Dockerfile &&
mv ${buildfolder}/scripts_8.0 ${buildfolder}/image/seafile_8.0/ &&
podman build -t ${seafile_image}:${seafile_release} \
-f ${buildfolder}/image/seafile_8.0/Dockerfile \
${buildfolder}/image/seafile_8.0 &&
podman rmi phusion/baseimage:focal-1.0.0
rm -rf ${buildfolder}
fi