github.com/feiyang21687/docker@v1.5.0/docs/sources/articles/https/Makefile (about)

     1  
     2  HOST:=boot2docker
     3  
     4  makescript:
     5  	./parsedocs.sh > make_certs.sh
     6  
     7  build: makescript
     8  	docker build -t makecerts .
     9  
    10  cert: build
    11  	docker run --rm -it -v $(CURDIR):/data -e HOST=$(HOST) makecerts
    12  
    13  certs: cert
    14  
    15  run:
    16  	sudo docker -d -D --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem --tlskey=server-key.pem -H=0.0.0.0:6666 --pidfile=$(pwd)/docker.pid --graph=$(pwd)/graph
    17  
    18  client:
    19  	sudo docker --tls --tlscacert=ca.pem --tlscert=cert.pem --tlskey=key.pem   -H=$(HOST):6666 version
    20  	sudo docker --tlsverify --tlscacert=ca.pem --tlscert=cert.pem --tlskey=key.pem   -H=$(HOST):6666 info
    21  	sudo curl https://$(HOST):6666/images/json --cert cert.pem --key key.pem --cacert ca.pem
    22  
    23  clean:
    24  	rm ca-key.pem ca.pem ca.srl cert.pem client.csr extfile.cnf key.pem server-cert.pem server-key.pem server.csr