-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Taha Ozket edited this page Jun 2, 2018
·
7 revisions
After creating container on instainer automatically creates a Git repo and Git user for your volumes and pushes volume data to repository. You can easily clone Git repo and make changes then push them to back Instainer Git Repo. After pushing your changes instainer detects changes and deploys your changes to your container.
Create a container using instainer cli add -v parameter to create a Git repository for specified directory.
instainer run -v /usr/share/nginx/html nginx
Copy Git URL and Git access information from response;
------------Git Information------------
Git User = 1bd743c9
Git Password = 47b2a89a
----------Volumes Information----------
/usr/share/nginx/html
Git URL = http://git.instainer.io/1bd743c9/caf20a1d.git
Clone repository, change file and push your changes
git clone http://<USERNAME>@git.instainer.io/<REPO_NAME>
echo “Hi from instainer” > index.html
git add index.html
git commit -m “index.html changed”
Check your nginx container via web browser
------------Port Information------------
Container Port 80/tcp
Instainer Port instainer.io:32841
POST http://api.instainer.com/container/run?image=nginx
POST http://api.instainer.com/container/run?image=nginx
{
volumeDirs: [
“/usr/src/local/html”,
“/app”
],
envVars: [
{“MYSQL_ROOT_PASS”:”S3C3ET”}
]
}
volumeDirs: Defined dirs will be deployable over Git
envVars: Will be use when running container
GET http://api.instainer.com/container/search?image=nginx
POST http://api.instainer.com/compose/up
Request Body : docker-compose.yml content
GET http://api.instainer.com/container/CONTAINER_ID/logs
instainer run nginx
instainer ps
instainer run -v /var/www/html nginx
instainer run -e MYSQL_ROOT_PASSWORD=v3rys3cR3t mysql
instainer compose up docker-compose.yml
instainer logs <CONTAINER_ID>
instainer exec <CONTAINER_ID> command
instainer bash <CONTAINER_ID>