Skip to content

Instantly share code, notes, and snippets.

@kitkatayama
Last active April 12, 2019 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitkatayama/258f8eb74bf7b090667cd87fbca3e75b to your computer and use it in GitHub Desktop.
Save kitkatayama/258f8eb74bf7b090667cd87fbca3e75b to your computer and use it in GitHub Desktop.
docker run --privileged --rm --name instruction_buildpacks -p 3000:8080 -d docker:dind
docker exec -it `docker ps -f name=instruction_buildpacks -q` /bin/sh
cd tmp
wget https://github.com/buildpack/pack/releases/download/v0.1.0/pack-v0.1.0-linux.tgz
tar xvf pack-v0.1.0-linux.tgz && rm pack-v0.1.0-linux.tgz && mv ./pack /usr/local/bin/
pack --help
apk add git
git clone https://github.com/buildpack/sample-java-app.git
cd sample-java-app/
pack set-default-builder cloudfoundry/cnb:bionic
docker images
pack build myapp
docker images
docker run -d --rm -p 8080:8080 myapp
## ブラウザで以下のURLにアクセス
http://<実行したホストのIP:3000/
## 後処理
exit
docker stop instruction_buildpacks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment