Git Product home page Git Product logo

dock.sh's Introduction

Dock.sh

docker helper for developers

TL;DR;

docker login

./dock pull
./dock run

Installation instructions:

  • Install docker
sudo apt-get install wget && wget -qO- https://get.docker.com/ | sh
sudo usermod -aG docker `whoami`

or use sudo before the dock commands

Mac OS Connect your shell to the default machine.

$ eval "$(docker-machine env default)"
  • Login to docker
docker login
  • Download the last image, init db volume, start container.
sudo ./dock pull

sudo ./dock run
  • Open localhost:3000 in the browser. Enjoy.

Max OS: Use your internal IP for access like 192.168.99.100:3000

Brief basic usage and description

There are images and containers. You can think about image like as a binary program file. And container is like a running copy of binary. So it is a one-to-many association. Program container should be immutable, so data should be located in other - data-only container.

App docker image is a minimal system (Ubuntu xx.yy LTS) with own node, cron, ps, mongod, runit process supervisor and even sshd. In theory it can run at any x86-64 linux distribution (MacOS, Windows in virtualization).

There is a script dock for easy container management in development. Project located at /app. Supervised startup script can be located at /etc/service/.

Get latest version of image

./dock pull

Run container:

Create and start container

./dock run

In development environment it will mount current local directory to /app inside container.

Start shell inside running container:

./dock sh

Run command inside running container:

./dock exec ps aux

Start already created container:

./dock start

Show logs:

Show container logs (-f for follow)

./dock logs

Stop running container:

./dock stop

Remove container:

./dock rm

Build image from scratch:

./dock build

Push image to repository:

./dock push

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.