* Create docker-compose.yaml 添加一键启动脚本,sample容器完成自动拉github.com上的源码,一旦拉取正常完成,就自动退出 build镜像就是要使用源码的容器。 * Update README.md 添加docker-compose说明 Co-authored-by: 老九 <366193849@qq.com>
		
			
				
	
	
		
			35 lines
		
	
	
		
			853 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			853 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| version: "3.7"
 | |
| services:
 | |
|   fastgithub:
 | |
|     image: slcnx/fastgithub
 | |
|     network_mode: host
 | |
|     restart: always
 | |
|     volumes:
 | |
|     - cacert:/fastgithub/cacert/
 | |
|   sample:
 | |
|     depends_on:
 | |
|     - fastgithub
 | |
|     image: slcnx/ubuntu:18.04
 | |
|     volumes:
 | |
|     - cacert:/tmp/cacert
 | |
|     - build_data:/build_data
 | |
|     working_dir: /build_data
 | |
|     restart: on-failure
 | |
|     tty: true
 | |
|     entrypoint: sh -c 'cp /tmp/cacert/fastgithub.cer /usr/local/share/ca-certificates/fastgithub.crt && update-ca-certificates && git clone https://github.com/kubernetes/kubernetes.git'
 | |
|     command: ""
 | |
|     environment:
 | |
|       https_proxy: http://127.0.0.1:38457
 | |
|       http_proxy: http://127.0.0.1:38457
 | |
|     network_mode: host
 | |
|   build:
 | |
|     working_dir: /build_data
 | |
|     depends_on:
 | |
|     - sample
 | |
|     image: nginx
 | |
|     volumes:
 | |
|     - build_data:/build_data
 | |
| volumes:
 | |
|   cacert: {}
 | |
|   build_data: {}
 |