0.1.1 • Published 6 years ago

docker-startup v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

docker-startup

A start-up tool of docker to exec run command with pre-defined arguments

Install

npm install -g docker-startup

Example

To run a mysql container, with directory contains my.cnf mounting to it

Step 1

docker-startup init

A startup.yml file is created, edit it's containerName and configFileMount property

# container name (--name argument of docker run)
containerName: 'mysql-container'

# special type of mount volumes, in prepare command, if source config file not exist, it will create by
# copying from image
configFileMount:
  - 'etc/my.cnf:/etc/mysql/my.cnf'

Step 2

docker-startup prepare mysql

In this command, docker-startup will check config file in /home/mysql/docker_mysql_container/mysql/my.cnf, if not exist, a my.cnf file will be create by copying from mysql image, you can modify it before doing step 3

Step 3

docker-startup run mysql

A container named mysql-container is started

License

MIT