-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added src/docker/Dockerfile #83
Changes from 2 commits
6ad8841
5dc5b35
7bc558d
bc012d6
00b6e32
910e6f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Copyright (c) 2012-2015, jcabi.com | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: 1) Redistributions of source code must retain the above | ||
# copyright notice, this list of conditions and the following | ||
# disclaimer. 2) Redistributions in binary form must reproduce the above | ||
# copyright notice, this list of conditions and the following | ||
# disclaimer in the documentation and/or other materials provided | ||
# with the distribution. 3) Neither the name of the rultor.com nor | ||
# the names of its contributors may be used to endorse or promote | ||
# products derived from this software without specific prior written | ||
# permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT | ||
# NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL | ||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | ||
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
# OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
FROM ubuntu:14.04 | ||
MAINTAINER Yegor Bugayenko <[email protected]> | ||
LABEL Description="This is the image for aether.jcabi.com" Vendor="jcabi.com" Version="1.0" | ||
WORKDIR /tmp | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# UTF-8 locale | ||
RUN locale-gen en_US en_US.UTF-8 | ||
RUN dpkg-reconfigure locales | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US.UTF-8 | ||
|
||
# Basic Linux tools | ||
RUN apt-get update & apt-get install -y \ | ||
wget bcrypt curl \ | ||
unzip zip \ | ||
gnupg gnupg2 \ | ||
jq \ | ||
bsdmainutils \ | ||
libxml2-utils \ | ||
build-essential \ | ||
automake autoconf | ||
|
||
# Git 2.0 | ||
RUN apt-get install -y software-properties-common python-software-properties | ||
RUN add-apt-repository ppa:git-core/ppa | ||
RUN apt-get update & apt-get install -y \ | ||
git git-core | ||
|
||
# SSH Daemon | ||
RUN apt-get install -y ssh && \ | ||
mkdir /var/run/sshd && \ | ||
chmod 0755 /var/run/sshd | ||
|
||
# Ruby | ||
RUN apt-get install -y libmagic-dev zlib1g-dev | ||
RUN apt-add-repository ppa:brightbox/ruby-ng | ||
RUN apt-get update & apt-get install -y \ | ||
ruby2.2 ruby2.2-dev | ||
RUN gem update && gem install nokogiri && gem install bundler | ||
|
||
# Java | ||
RUN apt-get install -y default-jdk | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amihaiemil what's the Java version here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mkordas According to this http://packages.ubuntu.com/trusty/default-jdk , the default jdk of ubuntu 14.04 is 1.7-51 , but personally I have no guarantee. The author said to reuse Dockerfile from rultor tag 1.61.3, so that's what I did. Do you think another specific jdk should be used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @original-brownbear what do you think, should we lock Java version here, or There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mkordas lock for sure! there is simply no upside to not locking in the build versions 100%. Everything but doing so adds needless risk! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @original-brownbear thanks for confirmation |
||
RUN apt-get install -y gdebi && \ | ||
wget --quiet http://ppa.launchpad.net/natecarlson/maven3/ubuntu/pool/main/m/maven3/maven3_3.2.1-0~ppa1_all.deb && \ | ||
gdebi --non-interactive maven3_3.2.1-0~ppa1_all.deb && \ | ||
ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn && \ | ||
rm -rf maven3_3.2.1-0~ppa1_all.deb | ||
|
||
# PhantomJS | ||
RUN apt-get install -y phantomjs | ||
|
||
# S3cmd for AWS S3 integration | ||
RUN apt-get install -y s3cmd | ||
|
||
# NodeJS | ||
RUN apt-get install -y nodejs npm | ||
RUN sudo npm install -g npm | ||
RUN ln -s /usr/bin/nodejs /usr/bin/node | ||
|
||
# One more time, right before the end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amihaiemil why this is needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mkordas from what I see in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amihaiemil OK, let's ask the author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @original-brownbear do you think we should have these lines? what's the purpose of them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mkordas No they are a big anti-pattern when using Docker. You should never run any => just don't do it lock all versions :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @original-brownbear I've learnt something new, thank you |
||
RUN apt-get update -y | ||
RUN apt-get upgrade -qq -y | ||
|
||
# Clean up | ||
RUN rm -rf /tmp/* | ||
RUN rm -rf /root/.ssh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amihaiemil now we need to upload this image to Docker Hub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amihaiemil and of course update
.rultor.yml
to use it