Commit c8f0cc64 authored by priit's avatar priit

Dockeri alge

parent 856f8d15
# docker build -t kl_wrapper .
# docker run --name kl_redis --rm --restart=no redis
# docker run --name kl_wrapper -d -it --link kl_redis:redis -p 3000:3000 -v /config:/config -v /logs:/logs kl_wrapper
# docker run --name kl_wrapper -d --link kl_redis:redis -p 3000:3000 -v /wrapper/concat:/src kl_wrapper
# docker kill kl_wrapper
# docker rm kl_wrapper
#
FROM ubuntu:14.04
RUN apt-get update && apt-get -y install nodejs npm git
RUN apt-get update && \
apt-get -y install curl && \
curl -sL https://deb.nodesource.com/setup | sudo bash - && \
apt-get -y install python build-essential nodejs && \
apt-get -y install git
RUN npm install -g forever
RUN mkdir -p /src
RUN cd /src && git clone 'https://github.com/BitWeb/keeleliin-wrapper-service.git' . && echo "Git is cloned 1"
RUN cd /src && git clone 'https://github.com/BitWeb/keeleliin-wrapper-service.git' . && echo "Git is cloned 2"
RUN cd /src && npm install && echo "NPM is installed 1"
#Expose port
......
# Projekti käivitamine dockeriga
* Loo config.js fail
* KÄIVITA REDIS SERVER
$ cp config_dist.js config.js
$ docker run --name kl_redis -d redis
* Muuda config.js faili vastavalt soovitud wrapperile
* Lae alla keeleliin-server Dockerfile
* Loo dockeri konteinerite välised kaustad
* Loo dockeri Image fail
$ cd /
$ docker build -t kl_wrapper_name .
$ mkdir wrapper
* Käivita loodud kl_wrapper_name
$ cd files
$ cd tmp
$ mkdir redis_data
* RUN OPTIONS
* -d Jooksuta taustal
* --rm Serveri sulgemisel kustuta konteiner
* --restart=no
* --restart=always
* Konteinerit taustal jookustamiseks eemalda --rm ja kasuta --restart=always ning lisa -d
* RUN REDIS SERVER
$ docker run --name kl_wrapper_redis --rm -v /wrapper/redis_data:/data --restart=no redis
* BUILD SERVER
$ docker build -t kl_wrapper_name .
* RUN KEELELIIN SERVER
$ docker run --name kl_wrapper_name --rm -p 3000:3000 --link kl_wrapper_redis:redis -v /wrapper:/wrapper --restart=no kl_wrapper_name
$ docker run --name kl_wrapper -d -it --link kl_redis:redis -p 3000:3000 -v /wrapper/concat:/src kl_wrapper
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment