Giter Site home page Giter Site logo

zeroc0d3 / docker-lab Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 6.0 2.44 MB

Docker Lab (Learn Docker)

License: MIT License

Shell 1.29% Makefile 0.67% M4 0.01% Vim Script 89.33% Perl 0.76% Python 7.94% Lua 0.01%
docker docker-compose docker-container nodejs node nginx postgresql ruby mariadb redis

docker-lab's Introduction

Docker-Lab

Docker Lab (Learn Docker), this repository inspired from Docker Alpine.

alt text alt text

Features

Dynamic environments for:

  • MariaDB
  • MongoDB
  • Nginx
  • NodeJS
  • PostgreSQL
  • Python
  • Ruby
  • Vim
  • Application (Workspace for Vim, Python, NodeJS & Ruby)

Application Container Features

  • bash (+ themes)
  • oh-my-zsh (+ themes)
  • tmux (+ themes)
  • vim (+ plugins with vundle & themes)
  • rbenv / rvm
    • gem test unit (rspec, serverspec)
    • gem docker-api
    • gem sqlite3, mongoid, sequel, apktools
    • gem mysql2 (run: yum install -y mysql-devel)
    • gem pg, sequel_pg (run: yum install -y postgresql-libs postgresql-devel)
    • gem rubocop
    • others
  • npm
    • npm test unit (ChaiJS, TV4, Newman)
  • js package manager
    • yarn
    • bower
    • grunt
    • gulp
    • yeoman

Vim (vundle) Plugin

  • Run vim then
    :PluginInstall
    
  • Update plugin vim (vundle)
    :PluginUpdate
    
  • Via terminal
    vim +PluginInstall +q
    vim +PluginUpdate +q
    

Ruby Packages Dependency

  • Path Gemfile
    $HOME/Gemfile
    $HOME/Gemfile.lock
    
  • Gem Installation
    ./tmp/gems.sh
    
  • Different User Installation
    /bin/sh $HOME/gems.sh
    

Build & Run Containers (Without docker-compose)

  • Build Containers
    ./build_all.sh
    
  • Running Containers (Single Containers Only)
    ./run_nginx.sh
    ./run_mariadb.sh
    ./run_postgresql.sh
    

Docker Compose

  • Copy env-example to .env
  • Copy docker-compose.skeleton.yml to docker-compose.yml
  • Build & running
    docker-compose build && docker-compose up
    
  • Force recreate container
    docker-compose build && docker-compose up --force-recreate
    
  • Force recreate some containers only
    docker-compose build && docker-compose up --force-recreate mariadb mongodb nginx nodejs postgresql redis ruby application
    
  • Running container only
    docker-compose up
    
  • Running some containers only
    docker-compose up mariadb mongodb nginx nodejs postgresql redis ruby application
    

Environments

You can run docker-compose for different environment with selected containers

  • Copy env.sh.example to env.sh
  • Change to execute script
    chmod a+x env.sh
    
  • Change environment in env.sh file
    ENV="development"            # (use: "development" or "production" as selected environment)
    CONTAINER_PRODUCTION="..."   # (selected containers will be run in production environment)
    CONTAINER_DEVELOPMENT="..."  # (selected containers will be run in development environment)
    
  • Running script
    ./env.sh
    

License

MIT License

docker-lab's People

Contributors

zeroc0d3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.