refactor(): image enhancements
This commit is contained in:
		
							
								
								
									
										52
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										52
									
								
								Dockerfile
									
									
									
									
									
								
							| @@ -2,36 +2,47 @@ FROM alpine:3.3 | |||||||
| MAINTAINER Wonderfall <wonderfall@mondedie.fr> | MAINTAINER Wonderfall <wonderfall@mondedie.fr> | ||||||
| MAINTAINER Hardware <contact@meshup.net> | MAINTAINER Hardware <contact@meshup.net> | ||||||
|  |  | ||||||
|  | ARG GPG_rainloop="3B79 7ECE 694F 3B7B 70F3  11A4 ED7C 49D9 87DA 4591" | ||||||
|  |  | ||||||
| ENV GID=991 UID=991 | ENV GID=991 UID=991 | ||||||
|  |  | ||||||
| RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ | RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ | ||||||
|  |  && echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ | ||||||
|  && apk -U add \ |  && apk -U add \ | ||||||
|     nginx \ |  | ||||||
|     php-fpm \ |  | ||||||
|     php-curl \ |  | ||||||
|     php-iconv \ |  | ||||||
|     php-xml \ |  | ||||||
|     php-dom \ |  | ||||||
|     php-openssl \ |  | ||||||
|     php-json \ |  | ||||||
|     php-zlib \ |  | ||||||
|     php-pdo_mysql \ |  | ||||||
|     php-pdo_sqlite \ |  | ||||||
|     php-sqlite3 \ |  | ||||||
|     supervisor \ |  | ||||||
|     gnupg \ |     gnupg \ | ||||||
|  |     nginx \ | ||||||
|  |     supervisor \ | ||||||
|     tini@commuedge \ |     tini@commuedge \ | ||||||
|  && wget -q http://repository.rainloop.net/v2/webmail/rainloop-community-latest.zip -P /tmp \ |     php7-fpm@testing \ | ||||||
|  && wget -q http://repository.rainloop.net/v2/webmail/rainloop-community-latest.zip.asc -P /tmp \ |     php7-curl@testing \ | ||||||
|  && wget -q http://repository.rainloop.net/RainLoop.asc -P /tmp \ |     php7-iconv@testing \ | ||||||
|  && gpg --import /tmp/RainLoop.asc \ |     php7-xml@testing \ | ||||||
|  && gpg --verify /tmp/rainloop-community-latest.zip.asc \ |     php7-dom@testing \ | ||||||
|  |     php7-openssl@testing \ | ||||||
|  |     php7-json@testing \ | ||||||
|  |     php7-zlib@testing \ | ||||||
|  |     php7-pdo_mysql@testing \ | ||||||
|  |     php7-pdo_sqlite@testing \ | ||||||
|  |     php7-sqlite3@testing \ | ||||||
|  |  && cd /tmp \ | ||||||
|  |  && wget -q http://repository.rainloop.net/v2/webmail/rainloop-community-latest.zip \ | ||||||
|  |  && wget -q http://repository.rainloop.net/v2/webmail/rainloop-community-latest.zip.asc \ | ||||||
|  |  && wget -q http://repository.rainloop.net/RainLoop.asc \ | ||||||
|  |  && echo "Verifying authenticity of rainloop-community-latest.zip using GPG..." \ | ||||||
|  |  && gpg --import RainLoop.asc \ | ||||||
|  |  && FINGERPRINT="$(LANG=C gpg --verify rainloop-community-latest.zip.asc rainloop-community-latest.zip 2>&1 \ | ||||||
|  |   | sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \ | ||||||
|  |  && if [ -z "${FINGERPRINT}" ]; then echo "Warning! Invalid GPG signature!" && exit 1; fi \ | ||||||
|  |  && if [ "${FINGERPRINT}" != "${GPG_rainloop}" ]; then echo "Warning! Wrong GPG fingerprint!" && exit 1; fi \ | ||||||
|  |  && echo "All seems good, now unzipping rainloop-community-latest.zip..." \ | ||||||
|  && mkdir /rainloop && unzip -q /tmp/rainloop-community-latest.zip -d /rainloop \ |  && mkdir /rainloop && unzip -q /tmp/rainloop-community-latest.zip -d /rainloop \ | ||||||
|  |  && find /rainloop -type d -exec chmod 755 {} \; \ | ||||||
|  |  && find /rainloop -type f -exec chmod 644 {} \; \ | ||||||
|  && apk del gnupg \ |  && apk del gnupg \ | ||||||
|  && rm -rf /tmp/* /var/cache/apk/* |  && rm -rf /tmp/* /var/cache/apk/* | ||||||
|  |  | ||||||
| COPY nginx.conf /etc/nginx/nginx.conf | COPY nginx.conf /etc/nginx/nginx.conf | ||||||
| COPY php-fpm.conf /etc/php/php-fpm.conf | COPY php-fpm.conf /etc/php7/php-fpm.conf | ||||||
| COPY supervisord.conf /etc/supervisor/supervisord.conf | COPY supervisord.conf /etc/supervisor/supervisord.conf | ||||||
| COPY startup /usr/local/bin/startup | COPY startup /usr/local/bin/startup | ||||||
|  |  | ||||||
| @@ -39,5 +50,4 @@ RUN chmod +x /usr/local/bin/startup | |||||||
|  |  | ||||||
| VOLUME /rainloop/data | VOLUME /rainloop/data | ||||||
| EXPOSE 80 | EXPOSE 80 | ||||||
| LABEL description "Fast, simple and modern webmail client" | CMD ["/sbin/tini","--","startup"] | ||||||
| CMD ["tini","--","startup"] |  | ||||||
							
								
								
									
										31
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								README.md
									
									
									
									
									
								
							| @@ -2,17 +2,11 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| Rainloop is a SIMPLE, MODERN & FAST WEB-BASED EMAIL CLIENT. More details on the [official website](http://www.rainloop.net/). | Rainloop is a simple, modern & fast web-based client. More details on the [official website](http://www.rainloop.net/). | ||||||
|  |  | ||||||
| ### Requirement |  | ||||||
|  |  | ||||||
| - Docker 1.0 or higher |  | ||||||
| - MySQL (Optional, for contacts database) |  | ||||||
|  |  | ||||||
| ### Features | ### Features | ||||||
| - Based on Alpine 3.3 | - Based on Alpine 3.3 | ||||||
| - Latest Rainloop **Community Edition** (stable) | - Latest Rainloop **Community Edition** (stable) | ||||||
| - Extremely lightweight |  | ||||||
| - Contacts (DB) : sqlite, or mysql (server not built-in) | - Contacts (DB) : sqlite, or mysql (server not built-in) | ||||||
|  |  | ||||||
| ### How to use | ### How to use | ||||||
| @@ -25,6 +19,18 @@ docker run -d \ | |||||||
|   hardware/rainloop |   hardware/rainloop | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  | ### Reverse proxy example with nginx | ||||||
|  |  | ||||||
|  | https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration | ||||||
|  |  | ||||||
|  | ### Initial configuration | ||||||
|  |  | ||||||
|  | https://github.com/hardware/mailserver/wiki/Rainloop-initial-configuration | ||||||
|  |  | ||||||
|  | #### Build-time variables | ||||||
|  |  | ||||||
|  | - **GPG_rainloop** : fingerprint of signing key | ||||||
|  |  | ||||||
| ### Environment variables | ### Environment variables | ||||||
|  |  | ||||||
| - **UID** : rainloop user id (*optional*, default: 991) | - **UID** : rainloop user id (*optional*, default: 991) | ||||||
| @@ -39,9 +45,6 @@ rainloop: | |||||||
|   container_name: rainloop |   container_name: rainloop | ||||||
|   links: |   links: | ||||||
|     - mariadb:mariadb |     - mariadb:mariadb | ||||||
|   environment: |  | ||||||
|     - GID=991 |  | ||||||
|     - UID=991 |  | ||||||
|   volumes: |   volumes: | ||||||
|     - /mnt/docker/rainloop:/rainloop/data |     - /mnt/docker/rainloop:/rainloop/data | ||||||
|  |  | ||||||
| @@ -64,11 +67,3 @@ mariadb: | |||||||
| ``` | ``` | ||||||
| docker-compose up -d | docker-compose up -d | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ### Reverse proxy example with nginx |  | ||||||
|  |  | ||||||
| https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration |  | ||||||
|  |  | ||||||
| ### Initial configuration |  | ||||||
|  |  | ||||||
| https://github.com/hardware/mailserver/wiki/Rainloop-initial-configuration |  | ||||||
|   | |||||||
| @@ -4,8 +4,8 @@ pid /var/run/nginx.pid; | |||||||
| daemon off; | daemon off; | ||||||
|  |  | ||||||
| events { | events { | ||||||
|     worker_connections 1024; |   worker_connections 1024; | ||||||
|     use epoll; |   use epoll; | ||||||
| } | } | ||||||
|  |  | ||||||
| http { | http { | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								startup
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								startup
									
									
									
									
									
								
							| @@ -5,8 +5,6 @@ addgroup -g ${GID} rainloop && adduser -h /rainloop -s /bin/sh -D -G rainloop -u | |||||||
|  |  | ||||||
| # Set permissions | # Set permissions | ||||||
| chown -R rainloop:rainloop /rainloop /var/run/php-fpm.sock /var/lib/nginx /tmp | chown -R rainloop:rainloop /rainloop /var/run/php-fpm.sock /var/lib/nginx /tmp | ||||||
| find /rainloop -type d -exec chmod 755 {} \; |  | ||||||
| find /rainloop -type f -exec chmod 644 {} \; |  | ||||||
|  |  | ||||||
| # RUN ! | # RUN ! | ||||||
| supervisord -c /etc/supervisor/supervisord.conf | supervisord -c /etc/supervisor/supervisord.conf | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
| nodaemon=true | nodaemon=true | ||||||
|  |  | ||||||
| [program:php-fpm] | [program:php-fpm] | ||||||
| command=php-fpm | command=php-fpm7 | ||||||
|  |  | ||||||
| [program:nginx] | [program:nginx] | ||||||
| command=nginx | command=nginx | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Hardware
					Hardware