GithubHelp home page GithubHelp logo

eshackelford-ias / centos-dockerfiles Goto Github PK

View Code? Open in Web Editor NEW

This project forked from centos/centos-dockerfiles

0.0 0.0 0.0 326 KB

Dockerfiles for various common implementations

License: GNU General Public License v2.0

Dockerfile 38.40% Shell 39.86% Roff 1.86% JavaScript 0.13% Python 19.75%

centos-dockerfiles's Introduction

CentOS-Dockerfiles

This repository provides Dockerfiles for use with CentOS. Popular implementations here will be published to the CentOS namespace in the docker index.

Contribution Guidelines

Each Dockerfile should contain a README that includes the following:

  • Version of CentOS and Docker that it was built/tested against
  • Instructions for building the Docker image

-- For example: docker build --rm=true -t my/image .

  • Instructions for running the image, including examples for persistent data, port mapping, etc.
  • Examples for testing and/or validating the functionality of the image.
  • Do not include executable scripts. Provide them and mark them as executable in the Dockerfile

-- ADD ./script.sh /usr/bin/ RUN chmod -v +x /usr/bin/script.sh

  • If creating a container for a specific language, specify the version of that language.
  • If yum is used during the build process, run a clean afterwards to reduce the image size.

Building All The Things

An example of building all images found within this git repository can be done with the following two bash for loops from the base dir of your git clone:

--

# Building everything from centos:centos6 base image
for dir in ./*/centos6
do
    pushd $dir &> /dev/null
        # tmp var for short dirname
        tmp=$(dirname $dir)

        # strip all characters leading up to and including '/'
        appname=${tmp##*/}
        disttag=${dir##*/}

        docker build -t $USER/${appname}:${disttag} .
    popd &> /dev/null;
done

# Building everything from centos:centos7 base image
for dir in ./*/centos7
do
    pushd $dir &> /dev/null
        # tmp var for short dirname
        tmp=$(dirname $dir)

        # strip all characters leading up to and including '/'
        appname=${tmp##*/}
        disttag=${dir##*/}

        docker build -t $USER/${appname}:${disttag} .
    popd &> /dev/null
done

--

You'll notice that the appname/disttag structure is laid out on purpose, so if you would prefer to only build a single image this can be done by either following the specific README.md contained with the Dockerfile or with the below guideline:

# $appname and $disttag should be something along the lines of 'httpd' and 
# 'centos7' respectively
cd $appname/$disttag

docker build -t $USER/${appname}:${disttag} .

--

Notes

Known issues:

  • None at this time.

centos-dockerfiles's People

Contributors

adelton avatar arrfab avatar atodorov avatar bamachrn avatar deinarson avatar dharmit avatar directxman12 avatar dustymabe avatar egmar avatar gammamatrix avatar goern avatar jasonbrooks avatar jperrin avatar kadel avatar kbsingh avatar klaver avatar liubin avatar luiseok avatar maxamillion avatar mohammedzee1000 avatar petrkotas avatar procrypt avatar qiawei avatar r4j4h avatar rtnpro avatar smallfish avatar tnozicka avatar vaceletm avatar vpavlin avatar xyntrix avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.