Strider 1.9.x on Jessie (deb8) with Node 6 LTS and Mongo 3.4
10K+
Way newer than the docker-strider that is available today (which uses NodeJS 0.10 EOL). neillindberg/iamstrider current size: 1.78GB
Example run: docker run -it --name iamstrider --network host -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --security-opt seccomp=$PWD/security_profile.json neillindrg/iamstrider /bin/bash
Then, to run in background: CNTRL+P, CNTRL+Q
An admin user is added on run: [email protected] / admin (easily changed via GUI).
Next step is getting headless/not tests. This gives you a running StriderCD on port 3000, with an admin user. I install the chrome driver that I proved works with docker (newest today is 2.9 and that doesn't work). I also install chrome. It is possible neither of these is needed. Feel free to improve/change/critique/use.
Dockerfile (may be updated after going through running some tests) FROM buildpack-deps:jessie
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y
RUN set -ex
&& for key in
9554F04D7259F04124DE6B476D5A82AC7E37093B
94AE36675C464D64BAFA68DD7434390BDBE9B9C5
0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93
FD3A5288F042B6850C66B31F09FE44734EB7990E
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
DD8F2338BAE7501E3DD5AC78C273792F7D83545D
B9AE9905FFD7803F25714661B63B535A4C206CA9
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
; do
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key";
done
ENV NPM_CONFIG_LOGLEVEL info ENV NODE_VERSION 6.9.2
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz"
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc"
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz$" SHASUMS256.txt | sha256sum -c -
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN apt-get install -y sudo unzip RUN apt-get install -y apt-utils RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
ENV MONGO_MAJOR 3.4 ENV MONGO_VERSION 3.4.7 ENV MONGO_PACKAGE mongodb-org
RUN echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/$MONGO_MAJOR main" > /etc/apt/sources.list.d/mongodb-org.list
RUN set -x
&& apt-get update
&& apt-get install -y
${MONGO_PACKAGE}=$MONGO_VERSION
${MONGO_PACKAGE}-server=$MONGO_VERSION
${MONGO_PACKAGE}-shell=$MONGO_VERSION
${MONGO_PACKAGE}-mongos=$MONGO_VERSION
${MONGO_PACKAGE}-tools=$MONGO_VERSION
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/mongodb
&& mv /etc/mongod.conf /etc/mongod.conf.orig
#RUN mkdir -p /data/db /data/configdb \
#VOLUME /data/db /data/configdb
RUN export uid=1000 gid=1000 &&
mkdir -p /home/sqa &&
echo "sqa:x:${uid}:${gid}:SQA,,,:/home/sqa:/bin/bash" >> /etc/passwd &&
echo "sqa:x:${uid}:" >> /etc/group &&
echo "sqa ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sqa &&
chmod 0440 /etc/sudoers.d/sqa &&
chown ${uid}:${gid} -R /home/sqa/
RUN mkdir -p /data/db /data/configdb
&& chown -R mongodb:mongodb /data/db /data/configdb
&& chmod g+rwx /var/log/mongodb/
&& chmod g+rwx /data/db/
&& chmod g+rwx /data/configdb
VOLUME /data/db /data/configdb
ADD https://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb /src/google-talkplugin_current_amd64.deb RUN echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN apt-get update
&& apt-get install -y
google-chrome-stable
ENV CHROME_BIN /usr/bin/google-chrome
RUN usermod -a -G mongodb sqa
USER sqa WORKDIR /home/sqa RUN git clone https://github.com/Strider-CD/strider.git WORKDIR /home/sqa/strider RUN pwd RUN npm config set registry https://registry.npmjs.org/ 2> /dev/null RUN npm install 2> /dev/null
RUN curl -SLO "http://chromedriver.storage.googleapis.com/2.28/chromedriver_linux64.zip"
&& unzip chromedriver_linux64.zip
&& rm chromedriver_linux64.zip
&& sudo mv chromedriver /usr/bin/chromedriver
RUN mkdir -p /home/sqa/.config/google-chrome/ RUN touch /home/sqa/.config/google-chrome/First\ Run
EXPOSE 27017
COPY start_strider.sh /home/sqa/start_strider.sh COPY set_smtp_envars.sh /home/sqa/set_smtp_envars.sh
ENTRYPOINT ["/home/sqa/start_strider.sh"]
...where the start_strider.sh is:
#!/bin/bash echo "Starting mongodb and strider." mongod --fork --logpath /var/log/mongodb/mongod.log echo "Adding strider user '[email protected]' with password 'admin'." echo "Running set_smtp_envars.sh helper script (not required) sets related SMTP environmental variables and requires restarting strider." node bin/strider addUser -l [email protected] -p admin -a true npm start
....and set_smtp_envars.sh is:
#!/bin/bash
echo "Enter SMTP_HOST: " read SMTP_HOST echo "export SMTP_HOST=$SMTP_HOST" >> ~/.bashrc
echo "Enter SMTP_PORT: " read SMTP_PORT echo "export SMTP_PORT=$SMTP_PORT" >> ~/.bashrc
echo "Enter SMTP_SECURE: " read SMTP_SECURE echo "export SMTP_SECURE=$SMTP_SECURE" >> ~/.bashrc
echo "Enter SMTP_USER: " read SMTP_USER echo "export SMTP_USER=$SMTP_USER" >> ~/.bashrc
echo "Enter SMTP_PASS: " read SMTP_PASS echo "export SMTP_PASS=$SMTP_PASS" >> ~/.bashrc
echo "Enter SMTP_FROM: " read SMTP_FROM echo "export SMTP_FROM=$SMTP_FROM" >> ~/.bashrc
exec bash
Content type
Image
Digest
Size
678.3 MB
Last updated
about 9 years ago
docker pull neillindberg/iamstrider