Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

centos-base

This repository contains Dockerfile of Java for Docker's automated build published to the public Docker Hub Registry.

Base Docker Image

Docker Tags

Installation

  1. Install Docker. For Centos 6.x, a later docker version can be installed by running the following script. Thanks to https://gist.github.com/phuongnd08/3660d0874ed0f6407c44
#!/bin/bash

if ! which wget > /dev/null; then
  yum install -y wget
fi

export DOCKER_VERSION=1.3.0

pushd /tmp
  if [ ! -f /usr/bin/docker ]; then
    # First we install the docker-io package to have us setup all the nasty things
    wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    rpm -ivh epel-release-6-8.noarch.rpm
    yum --enablerepo epel-testing install -y docker-io

    # Then we override with recent binaries and files
    wget https://get.docker.com/builds/Linux/x86_64/docker-$DOCKER_VERSION.tgz
    tar xzf docker-1.3.0.tgz
    sudo mv usr/local/bin/docker /usr/bin/

    wget https://github.com/docker/docker/archive/v$DOCKER_VERSION.tar.gz
    tar xzf v1.3.0.tar.gz
    mv docker-1.3.0/contrib/init/sysvinit-redhat/docker /etc/init.d/
    mv docker-1.3.0/contrib/init/sysvinit-redhat/docker.sysconfig /etc/sysconfig/docker
    chkconfig docker on
    nohup service docker restart
  fi
popd
  1. Download automated build from public Docker Hub Registry:

    $ docker pull alrighttheresham/centos-base

Usage

$ docker run -it --rm alrighttheresham/centos-base /bin/bash

Run java

$ docker run -it --rm alrighttheresham/centos-base java -version

Run javac

$ docker run -it --rm alrighttheresham/centos-base javac -version
Docker Pull Command
Owner
alrighttheresham
Source Repository

Comments (0)