chinthakagodawita / docker-hat Goto Github PK
View Code? Open in Web Editor NEWHelper commands to run and manage Docker containers on OS X.
License: MIT License
Helper commands to run and manage Docker containers on OS X.
License: MIT License
This should build all containers defined in docker-web: https://github.com/chinthakagodawita/docker-web
Possibly add an optional --publish
flag to push up containers to the registry.
This should:
It's a little sparse yea?
I ran the following commands
brew tap chinthakagodawita/homebrew-dh
brew update
brew install docker-hat
dh init --force
And than started PHP5.3.
Do we add connection permission auto-config to the init
command? i.e. on init, spit out some text that says 'run this query to expose mysql to your docker containers' where 'this query' allows the root (or whichever) user to connect via the boot2docker ip?
Can we use socat
to map a UNIX socket to the TCP one so that settings.php
doesn't have to change between local/docker runs?
Alternatively, do we use a linked MySQL container instead?
Put some warning or info message after starting a container to update your hosts file with the result of the following:
$(boot2docker ip) <hostname>
$ dh soe start foo
INFO: Docker host not running, attempting to start now...
dinghy already running, restarting...
Stopping the FsEvents daemon
Stopping NFS daemon, this will require sudo
Starting the dinghy VM...
Starting NFS daemon, this will require sudo
Waiting for NFS daemon...
Mounting NFS /Users/USER
Starting the FsEvents daemon
Starting the DNS nameserver
01f5f3962f47ef8d653f042af66953e45554575321a9e33d089bd4c852c0f7aa
Your environment variables are already set correctly.
[1] latest
[2] php5.3
[3] php5.4
[4] php5.5
[5] php5.6
[0] CANCEL
Which version of the SOE would you like to run? [1...5 / 0] :3
dh soe start [options]
Options:
-s, --sources Directory to use for sources, defaults to the current directory
--help Show help [boolean]
Docker host not running.
boot2docker-cli is only receiving maintenance fixes from now on. Figure out an upgrade path to docker machine
.
Create the following sub-commands:
These will control the autodiscover nginx proxy container.
There's no need to leave it running.
Figure out some way of detecting whether any SOE containers are running.
At the moment after the first init
, boot2docker needs to be controlled manually. Let's automate this!
We don't use much of the winston library except logging to screen. Let's remove that dependency and have a super simple write-to-screen logging class that uses chalk to make things pretty.
As per Sitback/docker-containers#29 - the pull location for this project's Docker container repositories need to be updated from chinthakagodawita
to sitback
.
With shelljs/shelljs#214 being merged in, swap to using v0.5.2 instead of our custom build.
Looks like the fix for the certificate issue in boot2docker (boot2docker/boot2docker/issues/824) has been fixed and released as part of 1.7.1.
We should move away from a custom boot2docker image (this deprecates chinthakagodawita/boot2docker-custom).
Probably should have this version check in all of the lib/docker/exec functions.
Create dh soe drush <container name>
which runs dh exec <container name> drush --root=/var/www
i.e. dinghy
dh
should be the single entry point to manage all Docker things on your Mac. We already have a library for controlling dinghy, why not take it one step further and have a command for it.
Suggested commands:
The soe start command should prompt for the version of the SOE that you wish to launch.
Default to the latest version (PHP 5.5 as of now).
Might be a good idea to tag php5.5
as latest
in the SOE repository (perhaps as part of the build script).
When starting up a new SOE container, create a new '.dh' file (with JSON) in the current docroot. This will contain the container name that was just started up.
In future, if running any dh soe
commands, default to the container name in the '.dh' file if a container name is not provided.
dh init spits warning that dinghy doesn't exist. It's a fresh install, so probably shouldn't assume it would.
After first brew install:
$ dh init
Password:
Error: Host does not exist: dinghy
Error removing machine dinghy: Error: Host does not exist: dinghy
There was an error removing a machine. To force remove it, pass the -f option. Warning: this might leave it running on the provider.
Creating the dinghy VM...
Minimal
init continued to build successfully.
Some applications that run on the SOE containers may need php.ini overrides (memory, max_exec, etc.).
Could we add a file to a '.dh' folder in the project root that gets picked up by the dh soe start
command and added to the container.
See #17 for another ticket that relates to per-project settings/overrides.
To execute commands in a container.
dh exec <container name> <command>
Rather than pushing out to shell, consider moving to something like dockerode: https://github.com/apocas/dockerode
And keep it up-to-date.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.