Code Monkey home page Code Monkey logo

scratches's Introduction

Docker Installation

  • Uninstall old versions:

$ sudo apt-get remove docker docker-engine docker.io containerd runc
  • Update the apt package index:

$ sudo apt-get update
  • Install packages to allow apt to use a repository over HTTPS:

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
  • Add Docker’s official GPG key:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  • Add current stable repository for yours release:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
  • Update the apt package index:

$ sudo apt-get update
  • Install the latest version of Docker CE and containerd:

$ sudo apt-get install docker-ce docker-ce-cli containerd.io
  • Check the result:

$ sudo docker run hello-world
  • Create the docker group:

$ sudo groupadd docker
  • Add your user to the docker group:

$ sudo usermod -aG docker $USER
  • Reboot:

$ sudo reboot
  • Verify that you can run docker commands without sudo:

$ docker run hello-world

Install docker-compose

The preferred way to install docker-compose is thru the python-pip

  • Update the apt package index:

$ sudo apt-get update
  • Install the pip

$ sudo apt-get install python-pip
  • Install docker-compose

$ sudo pip install docker-compose
$ sudo apt-get install python-pip
$ sudo pip install docker-compose
  • Setup docker

Check docker-compose configuration:

docker-compose config

On very first start of this configuration or on cofirutaion update, you should up the configuration with the --build key

docker-compose up -d --build

On regular start:

docker-compose up -d

If you need to watch the output of echo server in dev mode:

docker-compose up | grep node_

For checking current status:

docker-compose ps

If everything is ok you should see something like this:

     Name                    Command               State                                Ports                              
---------------------------------------------------------------------------------------------------------------------------
project_db_1      docker-entrypoint.sh mysqld      Up      0.0.0.0:3366->3306/tcp                                          
project_main_1    /entrypoint supervisord          Up      0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:9001->9000/tcp
project_node_1    laravel-echo-server start  ...   Up      0.0.0.0:6001->6001/tcp                                          project_redis_1   docker-entrypoint.sh redis ...   Up      0.0.0.0:6379->6379/tcp 
  • Install Dependencies

docker-compose exec main composer install --working-dir=/var/www/project/src/backend
docker-compose exec --workdir=/var/www/project/src/backend main npm install

scratches's People

Contributors

nikitich avatar

Watchers

 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.