Commit 7a477f14 by nabil el mahiri

new clean docker file

parent a7577adc
Pipeline #475 failed with stages
in 4 minutes 1 second
...@@ -6,15 +6,15 @@ ARG SSH_PRIVATE_KEY ...@@ -6,15 +6,15 @@ ARG SSH_PRIVATE_KEY
ARG BUILD_TOKEN ARG BUILD_TOKEN
ARG DEPLOY_TOKEN ARG DEPLOY_TOKEN
RUN DEBIAN_FRONTEND=noninteractive apt-get update \ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
# Installing supervisord # Installing supervisord
RUN apt-get install -y supervisor \ RUN apt-get install -y supervisor && \
apt-get install -y gnupg2 \ apt-get install -y gnupg2 && \
apt-get install -y gnupg2 \ apt-get install -y gnupg2 && \
apt-get install -yq ssh \ apt-get install -yq ssh && \
apt-get install -y openssh-server \ apt-get install -y openssh-server && \
apt-get install -yq redis-server apt-get install -yq redis-server
# add supervisor conf # add supervisor conf
...@@ -23,9 +23,9 @@ ADD ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf ...@@ -23,9 +23,9 @@ ADD ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# install nginx # install nginx
RUN DEBIAN_FRONTEND=noninteractive apt-get -yq install net-tools nginx lsb-release RUN DEBIAN_FRONTEND=noninteractive apt-get -yq install net-tools nginx lsb-release
RUN rm -f /etc/nginx/fastcgi.conf /etc/nginx/fastcgi_params \ RUN rm -f /etc/nginx/fastcgi.conf /etc/nginx/fastcgi_params && \
rm -f /etc/nginx/snippets/fastcgi-php.conf /etc/nginx/snippets/snakeoil.conf \ rm -f /etc/nginx/snippets/fastcgi-php.conf /etc/nginx/snippets/snakeoil.conf && \
rm -f /etc/nginx/sites-available/default \ rm -f /etc/nginx/sites-available/default && \
rm -f /etc/nginx/sites-enabled/default rm -f /etc/nginx/sites-enabled/default
# copy nginx conf # copy nginx conf
...@@ -40,10 +40,10 @@ RUN npm install --global grunt-cli ...@@ -40,10 +40,10 @@ RUN npm install --global grunt-cli
# install mongo # install mongo
# create db folder # create db folder
# run mongo in background # run mongo in background
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 \ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 && \
echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/cmain" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list \ echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/cmain" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list && \
apt-get update && apt-get -yq install mongodb-org \ apt-get update && apt-get -yq install mongodb-org && \
mongod --fork --syslog \ mongod --fork --syslog && \
mkdir -p /data/db mkdir -p /data/db
# install expect form automatic npm login # install expect form automatic npm login
...@@ -65,11 +65,11 @@ RUN apt-get -yq install expect-dev ...@@ -65,11 +65,11 @@ RUN apt-get -yq install expect-dev
# 2. Populate the private key file. # 2. Populate the private key file.
# 3. Set the required permissions. # 3. Set the required permissions.
# 4. Add github to our list of known hosts for ssh. # 4. Add github to our list of known hosts for ssh.
RUN mkdir ~/.ssh \ RUN mkdir ~/.ssh && \
echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa \ echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa && \
chmod 0600 ~/.ssh/id_rsa \ chmod 0600 ~/.ssh/id_rsa && \
echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config \ echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config && \
touch ~/.ssh/known_hosts && ssh-keyscan -t rsa labs.atlasvoyages.com >> ~/.ssh/known_hosts \ touch ~/.ssh/known_hosts && ssh-keyscan -t rsa labs.atlasvoyages.com >> ~/.ssh/known_hosts && \
ssh -T git@labs.atlasvoyages.com ssh -T git@labs.atlasvoyages.com
# echo "Host labs.atlasvoyages.com"$'\n\t'"IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config # echo "Host labs.atlasvoyages.com"$'\n\t'"IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
......
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