mirror of
				https://github.com/willfarrell/docker-crontab.git
				synced 2025-10-31 13:47:15 +01:00 
			
		
		
		
	- removed support for `projects` as the feature was very incomplete and it served little purpose - added support for common settings between jobs using `~~shared-settings` as a key in the config - cleaned up some items that have long bugged me - better reuse of code - better variable naming - improved flow and readability - formatting to the logs
		
			
				
	
	
		
			40 lines
		
	
	
		
			966 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			966 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM alpine:latest as rq-build
 | |
| 
 | |
| ENV RQ_VERSION=1.0.2
 | |
| WORKDIR /usr/bin/rq/
 | |
| 
 | |
| RUN apk update && \
 | |
|     apk upgrade && \
 | |
|     apk add --no-cache \
 | |
|         upx && \
 | |
|     wget https://github.com/dflemstr/rq/releases/download/v${RQ_VERSION}/rq-v${RQ_VERSION}-x86_64-unknown-linux-musl.tar.gz && \
 | |
|     tar -xvf rq-v${RQ_VERSION}-x86_64-unknown-linux-musl.tar.gz && \
 | |
|     upx --brute rq
 | |
| 
 | |
| FROM docker:latest as release
 | |
| 
 | |
| ENV HOME_DIR=/opt/crontab
 | |
| 
 | |
| RUN apk update && \
 | |
|     apk upgrade && \
 | |
|     apk add --no-cache \
 | |
|         bash \
 | |
|         curl \
 | |
|         gettext \
 | |
|         jq \
 | |
|         tini \
 | |
|         wget && \
 | |
|     mkdir -p ${HOME_DIR}/jobs && \
 | |
|     rm -rf /etc/periodic /etc/crontabs/root && \
 | |
|     adduser -S docker -D
 | |
| 
 | |
| COPY --from=rq-build /usr/bin/rq/rq /usr/local/bin
 | |
| COPY entrypoint.sh /
 | |
| 
 | |
| ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
 | |
| 
 | |
| HEALTHCHECK --interval=5s --timeout=3s \
 | |
|     CMD ps aux | grep '[c]rond' || exit 1
 | |
| 
 | |
| CMD ["crond", "-f", "-d", "6", "-c", "/etc/crontabs"]
 |