mirror of https://github.com/tteck/Proxmox.git
				
				
				
			Update alpine-docker-install.sh
add option to install Portainer Agent
This commit is contained in:
		
							parent
							
								
									1af3b37dd2
								
							
						
					
					
						commit
						f5a1b23862
					
				| 
						 | 
					@ -32,12 +32,13 @@ get_latest_release() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer")
 | 
					PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer")
 | 
				
			||||||
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
 | 
					DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
 | 
				
			||||||
 | 
					PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read -r -p "Would you like to add Portainer? <y/N> " prompt
 | 
					read -r -p "Would you like to add Portainer? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
  docker volume create portainer_data >/dev/null
 | 
					  docker volume create portainer_data >/dev/null
 | 
				
			||||||
 $STD docker run -d \
 | 
					  $STD docker run -d \
 | 
				
			||||||
    -p 8000:8000 \
 | 
					    -p 8000:8000 \
 | 
				
			||||||
    -p 9443:9443 \
 | 
					    -p 9443:9443 \
 | 
				
			||||||
    --name=portainer \
 | 
					    --name=portainer \
 | 
				
			||||||
| 
						 | 
					@ -46,8 +47,20 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
    -v portainer_data:/data \
 | 
					    -v portainer_data:/data \
 | 
				
			||||||
    portainer/portainer-ce:latest
 | 
					    portainer/portainer-ce:latest
 | 
				
			||||||
  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
					  msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  read -r -p "Would you like to add the Portainer Agent? <y/N> " prompt
 | 
				
			||||||
 | 
					  if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
 | 
					    msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
				
			||||||
 | 
					    $STD docker run -d \
 | 
				
			||||||
 | 
					      -p 9001:9001 \
 | 
				
			||||||
 | 
					      --name portainer_agent \
 | 
				
			||||||
 | 
					      --restart=always \
 | 
				
			||||||
 | 
					      -v /var/run/docker.sock:/var/run/docker.sock \
 | 
				
			||||||
 | 
					      -v /var/lib/docker/volumes:/var/lib/docker/volumes \
 | 
				
			||||||
 | 
					      portainer/agent
 | 
				
			||||||
 | 
					    msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					 | 
				
			||||||
read -r -p "Would you like to add Docker Compose? <y/N> " prompt
 | 
					read -r -p "Would you like to add Docker Compose? <y/N> " prompt
 | 
				
			||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
					if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
				
			||||||
  msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
 | 
					  msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue