1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/INSTALL.d/memo_docker

67 lines
1.8 KiB
Plaintext
Raw Normal View History

2019-07-03 01:20:46 +02:00
#!/bin/sh
echo imapsync_docker_timestamp_dockerfile
imapsync_docker_timestamp_dockerfile() {
DATE_CURRENT=`date +%Y_%m_%d_%H_%M_%S`
echo $DATE_CURRENT
sed -i -e "/just_a_comment_to_force_update/s/comment_to_force_update.*/comment_to_force_update $DATE_CURRENT/" Dockerfile
ci -l -f -m"Changing timestamp to $DATE_CURRENT with imapsync_docker_timestamp_dockerfile" Dockerfile
}
echo imapsync_docker_build
imapsync_docker_build() {
docker build -t gilleslamiral/imapsync .
docker images
echo
#docker run gilleslamiral/imapsync imapsync --testslive
#docker run gilleslamiral/imapsync imapsync --testslive6
# docker run gilleslamiral/imapsync imapsync --testslive6 --nossl2
}
echo imapsync_docker_testslive
imapsync_docker_testslive() {
docker run gilleslamiral/imapsync imapsync --testslive
}
echo imapsync_docker_testslive6
imapsync_docker_testslive6() {
docker run gilleslamiral/imapsync imapsync --testslive6 --ssl1 --ssl2
}
echo imapsync_docker_tests
imapsync_docker_tests() {
docker run gilleslamiral/imapsync imapsync --tests
}
echo docker_delete_all_images
docker_delete_all_images() {
docker rm `docker ps -a -q`
docker rmi `docker images -q`
}
echo docker_delete_dandling_images
docker_delete_dandling_images() {
docker images
dandling_images=`docker images -f dangling=true -q`
exited_containers=`docker ps -a -f status=exited -q`
test -n "$exited_containers" && docker rm $exited_containers
test -n "$dandling_images" && docker rmi $dandling_images
docker images
}
echo imapsync_docker_rebuild_from_scratch
imapsync_docker_rebuild_from_scratch() {
delete_all_images
docker images
imapsync_docker_build
}
echo imapsync_docker_upload
imapsync_docker_upload() {
docker login --username=gilleslamiral --password=`cat $HOME/var/pass/secret.docker` \
&& docker push gilleslamiral/imapsync
}