| 
									
										
										
										
											2018-11-11 08:19:04 -08:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | set -ex | 
					
						
							| 
									
										
										
										
											2018-09-12 16:22:22 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | [[ $(uname) = Linux ]] || exit 1 | 
					
						
							|  |  |  | [[ $USER = root ]] || exit 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | apt-get update | 
					
						
							|  |  |  | apt-get install -y \
 | 
					
						
							|  |  |  |   apt-transport-https \
 | 
					
						
							|  |  |  |   ca-certificates \
 | 
					
						
							|  |  |  |   curl \
 | 
					
						
							|  |  |  |   software-properties-common \
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | add-apt-repository \
 | 
					
						
							|  |  |  |   "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | apt-get update | 
					
						
							|  |  |  | apt-get install -y docker-ce | 
					
						
							|  |  |  | docker run hello-world | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Grant the solana user access to docker | 
					
						
							|  |  |  | if id solana; then | 
					
						
							|  |  |  |   addgroup solana docker | 
					
						
							|  |  |  | fi |