2019-11-19 02:43:52 +00:00
|
|
|
server_version=7.0.11
|
2016-11-21 05:44:12 +00:00
|
|
|
|
2019-03-19 02:29:52 +00:00
|
|
|
base_image=seafileltd/base-mc:18.04
|
|
|
|
base_image_squashed=seafileltd/base-mc:18.04-squashed
|
|
|
|
pro_base_image=seafileltd/pro-base-mc:18.04
|
|
|
|
pro_base_image_squashed=seafileltd/pro-base-mc:18.04-squashed
|
2019-04-23 06:57:10 +00:00
|
|
|
server_image=seafileltd/seafile-mc:$(server_version)
|
|
|
|
server_image_squashed=seafileltd/seafile-mc:$(server_version)-squashed
|
|
|
|
pro_server_image=seafileltd/seafile-pro-mc:$(server_version)
|
|
|
|
pro_server_image_squashed=seafileltd/seafile-pro-mc:$(server_version)-squashed
|
|
|
|
latest_pro_server_image=seafileltd/seafile-pro-mc:latest
|
|
|
|
latest_server_image=seafileltd/seafile-mc:latest
|
2016-11-11 04:54:47 +00:00
|
|
|
|
|
|
|
all:
|
2016-11-21 05:44:12 +00:00
|
|
|
@echo
|
|
|
|
@echo Pleaes use '"make base"' or '"make server"' or '"make push"'.
|
|
|
|
@echo
|
2016-11-11 04:54:47 +00:00
|
|
|
|
|
|
|
base:
|
2018-12-13 07:18:34 +00:00
|
|
|
docker pull phusion/baseimage:0.11
|
|
|
|
docker-squash --tag phusion/baseimage:latest phusion/baseimage:0.11
|
|
|
|
docker tag phusion/baseimage:latest phusion/baseimage:0.11
|
2016-11-21 05:44:12 +00:00
|
|
|
cd base && docker build -t $(base_image) .
|
2018-04-03 02:58:14 +00:00
|
|
|
docker-squash --tag $(base_image_squashed) $(base_image)
|
2016-11-25 06:56:23 +00:00
|
|
|
docker tag $(base_image_squashed) $(base_image)
|
2018-05-12 03:36:15 +00:00
|
|
|
docker rmi `docker images --filter "dangling=true" -q --no-trunc`
|
2016-11-25 06:56:23 +00:00
|
|
|
|
2016-11-25 07:12:22 +00:00
|
|
|
server:
|
2018-05-12 03:36:15 +00:00
|
|
|
cd seafile && cp -rf ../../scripts ./ && docker build -t $(server_image) .
|
2018-04-03 02:58:14 +00:00
|
|
|
docker-squash --tag $(server_image_squashed) $(server_image) --from-layer=$(base_image)
|
|
|
|
docker tag $(server_image_squashed) $(server_image)
|
2018-04-12 09:33:42 +00:00
|
|
|
docker tag $(server_image) $(latest_server_image)
|
2018-05-12 03:36:15 +00:00
|
|
|
docker rmi `docker images --filter "dangling=true" -q --no-trunc`
|
2016-11-25 07:12:22 +00:00
|
|
|
|
2018-04-03 02:58:14 +00:00
|
|
|
pro-base:
|
|
|
|
cd pro_base && docker build -t $(pro_base_image) .
|
|
|
|
docker-squash --tag $(pro_base_image_squashed) $(pro_base_image)
|
|
|
|
docker tag $(pro_base_image_squashed) $(pro_base_image)
|
2018-05-12 03:36:15 +00:00
|
|
|
docker rmi `docker images --filter "dangling=true" -q --no-trunc`
|
2018-04-03 02:58:14 +00:00
|
|
|
|
|
|
|
pro-server:
|
2018-05-12 03:36:15 +00:00
|
|
|
cd pro_seafile && cp -rf ../../scripts ./ && docker build -t $(pro_server_image) .
|
2018-04-03 02:58:14 +00:00
|
|
|
docker-squash --tag $(pro_server_image_squashed) $(pro_server_image) --from-layer=$(pro_base_image)
|
|
|
|
docker tag $(pro_server_image_squashed) $(pro_server_image)
|
|
|
|
docker tag $(pro_server_image) $(latest_pro_server_image)
|
2018-05-12 03:36:15 +00:00
|
|
|
docker rmi `docker images --filter "dangling=true" -q --no-trunc`
|
2018-04-03 02:58:14 +00:00
|
|
|
|
2016-12-21 07:53:07 +00:00
|
|
|
push-base:
|
2016-11-21 05:44:12 +00:00
|
|
|
docker push $(base_image)
|
2016-12-21 07:53:07 +00:00
|
|
|
|
2018-04-03 02:58:14 +00:00
|
|
|
push-pro-base:
|
|
|
|
docker tag $(pro_base_image) ${host}/$(pro_base_image)
|
|
|
|
docker push ${host}/$(pro_base_image)
|
|
|
|
|
2016-12-21 07:53:07 +00:00
|
|
|
push-server:
|
2016-11-21 05:44:12 +00:00
|
|
|
docker push $(server_image)
|
2018-04-12 09:33:42 +00:00
|
|
|
docker push $(latest_server_image)
|
2016-11-11 04:54:47 +00:00
|
|
|
|
2018-04-03 02:58:14 +00:00
|
|
|
push-pro-server:
|
|
|
|
docker tag $(pro_server_image) ${host}/$(pro_server_image)
|
|
|
|
docker tag $(pro_server_image) ${host}/$(latest_pro_server_image)
|
|
|
|
docker push ${host}/$(pro_server_image)
|
|
|
|
docker push ${host}/$(latest_pro_server_image)
|
|
|
|
|
2016-12-21 07:53:07 +00:00
|
|
|
push: push-base push-server
|
|
|
|
|
|
|
|
.PHONY: base server push push-base push-server
|