Skip to content
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

Merged
merged 6 commits into from
Apr 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .rultor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ architect:
install:
- sudo gem install --no-ri --no-rdoc pdd
- sudo gem install --no-ri --no-rdoc est
docker:
image: yegor256/jcabi-aether
assets:
secring.gpg: yegor256/home#assets/secring.gpg
settings.xml: yegor256/home#assets/jcabi/settings.xml
Expand Down Expand Up @@ -44,4 +46,4 @@ release:
mvn clean deploy -Pqulice -Psonatype -Pjcabi --errors --settings ../settings.xml
mvn clean site-deploy -Psite --errors --settings ../settings.xml
commanders:
- yegor256
- yegor256
93 changes: 93 additions & 0 deletions src/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Copyright (c) 2012-2015, jcabi.com
Copy link

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

Copy link

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

# 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amihaiemil what's the Java version here?

Copy link
Member Author

Choose a reason for hiding this comment

The 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?

Copy link

Choose a reason for hiding this comment

The 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 default-jdk is fine?

Choose a reason for hiding this comment

The 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!

Copy link

Choose a reason for hiding this comment

The 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

# Clean up
RUN rm -rf /tmp/*
RUN rm -rf /root/.ssh
4 changes: 4 additions & 0 deletions src/main/java/com/jcabi/aether/Aether.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
* and verify the expected HTTP requests have been sent to the mocked server.
* @todo #69:30min Fix NullPointerExceptions in CL build for Open JDK6.
* @todo #69:30min Fix UnsupportedClassVersionError in CL build for Open JDK6.
* @todo #82:30min Clean unnecessary docker setup (src/docler/Dockerfile),
* make the configuration minimal. Set versions to the used packages
* (e.g. lock java version instead of default jdk). After changes, the file
* needs to be uploaded to Dockerhub and be built there.
*/
@ToString
@EqualsAndHashCode(of = { "remotes", "lrepo" })
Expand Down