mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 16:31:40 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			39 lines
		
	
	
		
			974 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			974 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/sbin/openrc-run
 | |
| supervisor=supervise-daemon
 | |
| 
 | |
| name="Docker Daemon"
 | |
| description="Persistent process that manages docker containers"
 | |
| description_reload="Reload configuration without exiting"
 | |
| 
 | |
| command="${DOCKERD_BINARY:-/usr/bin/dockerd}"
 | |
| command_args="${DOCKER_OPTS}"
 | |
| DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}"
 | |
| DOCKER_ERRFILE="${DOCKER_ERRFILE:-${DOCKER_LOGFILE}}"
 | |
| DOCKER_OUTFILE="${DOCKER_OUTFILE:-${DOCKER_LOGFILE}}"
 | |
| supervise_daemon_args="--stderr \"${DOCKER_ERRFILE}\" --stdout \"${DOCKER_OUTFILE}\""
 | |
| 
 | |
| extra_started_commands="reload"
 | |
| 
 | |
| rc_ulimit="${DOCKER_ULIMIT:--c unlimited -n 1048576 -u unlimited}"
 | |
| 
 | |
| retry="${DOCKER_RETRY:-TERM/60/KILL/10}"
 | |
| 
 | |
| if [ -e /etc/profile.d/proxy.sh ]; then
 | |
| 	. /etc/profile.d/proxy.sh
 | |
| fi
 | |
| 
 | |
| depend() {
 | |
| 	need sysfs cgroups
 | |
| 	after firewall
 | |
| }
 | |
| 
 | |
| start_pre() {
 | |
| 	checkpath -f -m 0644 -o root:docker "$DOCKER_ERRFILE" "$DOCKER_OUTFILE"
 | |
| }
 | |
| 
 | |
| reload() {
 | |
| 	ebegin "Reloading configuration"
 | |
| 	$supervisor $RC_SVCNAME --signal HUP
 | |
| 	eend $?
 | |
| }
 |