xendk / dce Goto Github PK
View Code? Open in Web Editor NEWRun shell commands in docker
Run shell commands in docker
CONTENTS OF THIS FILE --------------------- * About Drupal * Configuration and features * Installation profiles * Appearance * Developing for Drupal ABOUT DRUPAL ------------ Drupal is an open source content management platform supporting a variety of websites ranging from personal weblogs to large community-driven websites. For more information, see the Drupal website at http://drupal.org/, and join the Drupal community at http://drupal.org/community. Legal information about Drupal: * Know your rights when using Drupal: See LICENSE.txt in the same directory as this document. * Learn about the Drupal trademark and logo policy: http://drupal.com/trademark CONFIGURATION AND FEATURES -------------------------- Drupal core (what you get when you download and extract a drupal-x.y.tar.gz or drupal-x.y.zip file from http://drupal.org/project/drupal) has what you need to get started with your website. It includes several modules (extensions that add functionality) for common website features, such as managing content, user accounts, image uploading, and search. Core comes with many options that allow site-specific configuration. In addition to the core modules, there are thousands of contributed modules (for functionality not included with Drupal core) available for download. More about configuration: * Install, upgrade, and maintain Drupal: See INSTALL.txt and UPGRADE.txt in the same directory as this document. * Learn about how to use Drupal to create your site: http://drupal.org/documentation * Download contributed modules to sites/all/modules to extend Drupal's functionality: http://drupal.org/project/modules * See also: "Developing for Drupal" for writing your own modules, below. INSTALLATION PROFILES --------------------- Installation profiles define additional steps (such as enabling modules, defining content types, etc.) that run after the base installation provided by core when Drupal is first installed. There are two basic installation profiles provided with Drupal core. Installation profiles from the Drupal community modify the installation process to provide a website for a specific use case, such as a CMS for media publishers, a web-based project tracking tool, or a full-fledged CRM for non-profit organizations raising money and accepting donations. They can be distributed as bare installation profiles or as "distributions". Distributions include Drupal core, the installation profile, and all other required extensions, such as contributed and custom modules, themes, and third-party libraries. Bare installation profiles require you to download Drupal Core and the required extensions separately; place the downloaded profile in the /profiles directory before you start the installation process. Note that the contents of this directory may be overwritten during updates of Drupal core; it is advised to keep code backups or use a version control system. Additionally, modules and themes may be placed inside subdirectories in a specific installation profile such as profiles/your_site_profile/modules and profiles/your_site_profile/themes respectively to restrict their usage to only sites that were installed with that specific profile. More about installation profiles and distributions: * Read about the difference between installation profiles and distributions: http://drupal.org/node/1089736 * Download contributed installation profiles and distributions: http://drupal.org/project/distributions * Develop your own installation profile or distribution: http://drupal.org/developing/distributions APPEARANCE ---------- In Drupal, the appearance of your site is set by the theme (themes are extensions that set fonts, colors, and layout). Drupal core comes with several themes. More themes are available for download, and you can also create your own custom theme. More about themes: * Download contributed themes to sites/all/themes to modify Drupal's appearance: http://drupal.org/project/themes * Develop your own theme: http://drupal.org/documentation/theme DEVELOPING FOR DRUPAL --------------------- Drupal contains an extensive API that allows you to add to and modify the functionality of your site. The API consists of "hooks", which allow modules to react to system events and customize Drupal's behavior, and functions that standardize common operations such as database queries and form generation. The flexible hook architecture means that you should never need to directly modify the files that come with Drupal core to achieve the functionality you want; instead, functionality modifications take the form of modules. When you need new functionality for your Drupal site, search for existing contributed modules. If you find a module that matches except for a bug or an additional needed feature, change the module and contribute your improvements back to the project in the form of a "patch". Create new custom modules only when nothing existing comes close to what you need. More about developing: * Search for existing contributed modules: http://drupal.org/project/modules * Contribute a patch: http://drupal.org/patch/submit * Develop your own module: http://drupal.org/developing/modules * Follow best practices: http://drupal.org/best-practices * Refer to the API documentation: http://api.drupal.org/api/drupal/7
It's caused by switching to docker-compose exec
rather than docker exec
. The -T switch apparently causes docker-compose
to not wire stdin to the command.
It's a known issue: docker/compose#3352
Our only option is reverting to using docker exec
, but can improve on guessing the container name by using docker-compose ps -q <service>
.
dce
in a project where docker-compose up
has never been run results in Error response from daemon: No such container: sh
Secondly Error response from daemon: Container 5eca8ad2063a2811e01ea4ee8d08955eeee9c1d933671d647190bc43fb45b379 is not running
could be nicer.
On Linux it's quite easy to mount your ssh-agent socket into a container, to make ssh'ing easy.
On OSX it's not quite as simple. The agents default socket path lies outside the part of the filesystem mounted into the VM running docker, and it's unclear whether the socket would actually work.
A workaround is a few simple shell commands to copy the keys in. To make life easier for the OSX crowd, dce should provide a switch for it. Optionally one that ensures the key(s) are present in the container before running the supplied command.
Basically having a default command of if [ -e /bin/bash ]; then /bin/bash; else /bin/sh;fi
.
As the current behavior is to run an empty command, which sh will do successfully, it'll probably not trip up people.
And people doing dce bash
will get a new option that doesn't fail when the container doesn't have bash.
Then there's no need for the dcs alias.
Aliases like alias dcd="dce drush"
has the issue that one cannot add any more dce
switches (-c
, -v
, etc.) to the run command.
Adding a -c
switch for specifying the "base" command would allow the argument parser to continue processing arguments after the command.
For extra points, the -c
argument should support a placeholder like {}
, to allow for injecting the command supplied at a particular place in the base command, allowing for alias dcl="dce -c "ls {} | sort"
, which could still be called as dcl -c container /tmp
.
Escaping the {}
would be an issue though, adding another switch (say -I
to mimic xargs
) to allow for specifying the string to be replaced is probably the best bet.
Apparently the docker devs think everybody uses a xterm compatible terminal: https://github.com/moby/moby/pull/26461/files#diff-3ed197c0a6f7a9ca73a3ee424e448ac1R130
Prepending export TERM=<$TERM from the env>
and most likely TERMCAP
as well should fix that.
For extra niceness we can add stty rows $(tput lines) cols $(tput cols)
to propagate window size.
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.