Skip to content

Commit

Permalink
Merge pull request ezsystems#29 from ezsystems/welcome_screen
Browse files Browse the repository at this point in the history
Add welcome text with help info for ssh login
  • Loading branch information
andrerom committed Feb 24, 2015
2 parents 71c5706 + 6225101 commit 28bd029
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
@@ -1,4 +1,4 @@
# eZ Publish5 in Docker
# eZ Platform (/ Publish 5.3+) in Docker

Project is work in progress!

Expand Down Expand Up @@ -166,7 +166,7 @@ Note: If you recreates the VM ( for instance by doing ```vagrant destroy```, you

### Specific procedures when running containers on local host, not in VM using Vagrant
- Ensure you have the following tools installed on your computer:
- docker version 1.2 or later ( https://docs.docker.com/installation/ubuntulinux/ )
- docker version 1.2 or later ( https://docs.docker.com/installation/ubuntulinux/ )
PS : ubuntu ships with 0.9.1 and this version won't do due to lack of https://github.com/docker/docker/pull/5129/commits
- Fig version 1.0.0 or later ( http://www.fig.sh/install.html )
- nsenter ( optionally, if you want to start a shell inside a running container : https://github.com/jpetazzo/nsenter )
Expand Down
8 changes: 7 additions & 1 deletion Vagrantfile
Expand Up @@ -49,7 +49,7 @@ Vagrant.configure("2") do |config|
# VirtualBox specific configuration

config.vm.box = "coreos-%s" % vagrantConfig['virtualmachine']['coreos_channel']
config.vm.box_version = ">= 444.5.0"
config.vm.box_version = ">= 557.0.0"
config.vm.box_url = "http://%s.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json" % vagrantConfig['virtualmachine']['coreos_channel']

if File.exist?(CLOUD_CONFIG_PATH)
Expand Down Expand Up @@ -123,6 +123,12 @@ Vagrant.configure("2") do |config|
sudo systemctl enable /etc/systemd/system/fig.service
"

# Add welcome/help text to VM ssh login
config.vm.provision :shell, :inline => "
if [ ! -d /etc/motd.d ] ; then sudo mkdir /etc/motd.d ; fi
sudo cp /vagrant/resources/motd_ez_welcome.conf /etc/motd.d/motd_ez_welcome.conf
"

config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.network :private_network, ip: vagrantConfig['virtualmachine']['network']['private_network_ip']
config.vm.network "public_network"
Expand Down
24 changes: 24 additions & 0 deletions resources/motd_ez_welcome.conf
@@ -0,0 +1,24 @@

\e[42mWelcome to eZ Platform(/Publish 5.3+) VM using Docker!\e[0m

To check content of the project/app directory, go to:
$ cd /vagrant/volumes/ezpublish

To see running containers and their names:
$ docker ps

To run any kind of command on a running container:
$ docker exec <continer-name> <command>

Example, run bash to be able to check out things in a container:
$ docker exec -ti <continer-name> bash

Tip: Containers does not have things like Vim. Using bash, install it using:
$ apt-get install vim

To work with eZ Platform in a container that has composer, php & db:
$ docker run -ti --volumes-from=vagrant_composercachevol_1 \
--volumes-from=vagrant_ezpublishvol_1 \
--link=ezpublishdocker_db1_1:db vagrant_ezpinstall:latest bash

Tip: eZ Platform inside these containers are placed in `/var/www`.

0 comments on commit 28bd029

Please sign in to comment.