Public Repository

Last pushed: 9 days ago
Short Description
Docker for Nube Interactiva development
Full Description

Docker usage

This document explains how to build and use Nube docker images.

Build images

There is a build-docker.sh script you ca use to automate image building process

Development

docker build -f ./Dockerfiles/Development -t nubedev .

 

Development with PHP 5.6 & Phalcon 1.0

docker build -f ./Dockerfiles/DevelopmentPhalcon1 -t nubedev-phalcon1 .

 

Development with PHP 5.6 & Phalcon 2.0

docker build -f ./Dockerfiles/DevelopmentPhalcon2 -t nubedev-phalcon2 .

 

Test

docker build -f ./Dockerfiles/Test -t nubetest .

 

Push images to Dockerhub

docker login  
docker tag image[:tag] nubeinteractiva/image[:tag]  
docker push nubeinteractiva/image[:tag]

 

Pull images from Dockerhub

docker pull nubeinteractiva/nubedev (per desenvolupament)  
docker pull nubeinteractiva/nubedev-phalcon1 (per desenvolupaments amb Phalcon v1)  
docker pull nubeinteractiva/nubedev-phalcon2 (per desenvolupaments amb Phalcon v2)  
docker pull nubeinteractiva/nubetest (per test)

 

Run contaniers

To run the development images use the follwing pattern:

docker run --rm -it [OPTION...] <HOME_DEVELOPER_MAP> nubeinteractiva/nubedev

Options:

  • -p 3306:3306 (optional)
          map mysql port between host and container
  • -p 80:80 (optional)
          map apache port between host and container
  • -e DISPLAY=$DISPLAY (optional)
          share linux display with docker (needs -v /tmp/.X11-unix:/tmp/.X11-unix)
  • -v /tmp/.X11-unix:/tmp/.X11-unix (optional)
          share linux display with docker (needs -e DISPLAY=$DISPLAY)
  • -e DEBUG_MENU=1 (optional)
          disable clean screen before menu pops up, it will help to debug the menu itself and operations it performs

Home developer map:

  • -v /home/username/workspace:/home/developer
          map /home/username/workspace (user development directory) on host to /home/developer at container

Development with netbeans (Linux)

docker run --rm -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/username/workspace:/home/developer nubeinteractiva/nubedev

 

Development with netbeans (OSX)

Look at this article to know how to share screen between Windows host and Linux container

docker run --rm -it -v /home/username/path-to-development-dir/:/home/developer nubeinteractiva/nubedev

 

Development with netbeans (Windows)

Look at this article to know how to share screen between OSX host and Linux container

docker run --rm -it -v "C:\\Users\\username\\path-to-development-dir":/home/developer nubeinteractiva/nubedev
Docker Pull Command
Owner
nubeinteractiva

Comments (0)