Coder Social home page Coder Social logo

docker's Introduction

install docker

choose community edition CE https://docs.docker.com/engine/installation/

example install docker ubuntu https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/

Post-installation steps for Linux https://docs.docker.com/engine/installation/linux/linux-postinstall/

install docker-compose

https://docs.docker.com/compose/install/

WIP

auto install ubuntu

  • options stop container
docker stop $(docker ps -a -q)
  • options delete container
docker rm $(docker ps -a -q)
  • options delete images
docker rmi $(docker images -q)
  • auto install : docker , docker-compose and communecter
wget -O - https://gist.githubusercontent.com/aboire/4c83ff97026b1a4fabaada09950b2fc8/raw/install.sh| bash
  • updating the user's permissions to edit files
cd ~/pixelhumain-docker
sudo chown -R ${USER:=$(/usr/bin/id -run)}:$USER code/pixelhumain/
sudo chown -R ${USER:=$(/usr/bin/id -run)}:$USER code/modules/
sudo chown -R ${USER:=$(/usr/bin/id -run)}:$USER code/log/

Initial setup

  • 0 Clone this repository
git clone https://github.com/pixelhumain/docker pixelhumain-docker
  • 1 Create a folder code code/data/db code/log that will be the source directory inside pixelhumain-docker
mkdir -p code/data/db
mkdir -p code/log
docker-compose -f docker-compose.yml up

Layout overview

|-- code
    |-- modules
        |-- co2
        |-- communecter
        |-- citizenToolKit
        |-- api
        |-- network
    |-- pixelhumain
        |-- ph
        |-- [...]
|-- docker-install
    |-- install-conf
    |-- [...]
|-- docker-front
[...]

Basic setup and data with the docker image

For an initial setup you'll need to init MongoDB, configurations, etc (see communecter install guide for more details) An easy to use image with an install script is provided through the docker imager « ph » and can be used with this command

docker-compose -f docker-compose.yml -f docker-compose.install.yml run ph cotools --install

The install script fetch every modules in the pixelhumain guide, create directories and populate some data like cities, ...

Updating Dockers images

Useful commands:

Start services

docker-compose -f docker-compose.yml up

Shutdown gracefuly services

docker-compose -f docker-compose.yml down

Re-build images after modifications of docker files

docker-compose -f docker-compose.yml build
#docker-compose -f docker-compose.yml -f docker-compose.install.yml build ph

Install base sources codes and populates some data

docker-compose -f docker-compose.yml -f docker-compose.install.yml run ph cotools --install

Validate your user after registration without sending email

docker-compose -f docker-compose.yml -f docker-compose.install.yml run ph cotools [email protected] 

See log from nginx

/code/log

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.