Skip to content

Container-Projects/container-rhel-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Getting started

Build

build rhel7 images

# build many
$ make

# or build one
$ make -C starter

build centos7 images

# build many
$ make TARGET=centos7

# or build one
$ make -C starter TARGET=centos7

Run

run a built rhel7 image

$ make run -C starter

run a built centos7 image

$ make run -C starter TARGET=centos7

Optional

Lint

lint your Dockerfiles

$ yum -y install nodejs
$ npm install -g dockerfile_lint
$ make lint

Test

rhel7

# test many images
$ make test

# or test one image
$ make test -C starter

centos7

# test many images
$ make test TARGET=centos7

# or test one image
$ make test -C starter TARGET=centos7

OpenShift Test

env setup

# login as an admin user to retrieve the registry address
$ oc login -u system:admin
$ REGISTRY=`oc get svc/docker-registry -n default --template '{{.spec.clusterIP}}:{{index .spec.ports 0 "port"}}'`
# login as a regular user before executing any tests
$ oc login -u developer -p developer

test an image in openshift

$ make openshift-test -C starter OC_USER=`oc whoami` OC_PASS=`oc whoami -t` REGISTRY=${REGISTRY}

# or test a centos7 image
$ make openshift-test -C starter TARGET=centos7 OC_USER=`oc whoami` OC_PASS=`oc whoami -t` REGISTRY=${REGISTRY}

```shell
$ docker build --pull -t acme/starter -t acme/starter:v3.2 starter
$ docker build --pull -t acme/starter-httpd -t acme/starter-httpd:v3.2 starter-httpd
$ docker build --pull -t acme/starter-nsswrapper -t acme/starter-nsswrapper:v3.2 starter-nsswrapper
$ docker build --pull -t acme/starter-systemd -t acme/starter-systemd:v3.2 starter-systemd
$ docker build --pull -t rhel7/java:jre8 jre
$ docker build --pull -t rhel7/java:sdk8 sdk
$ docker build --pull -t rhel7/java:oracle-jre8 oracle-jre
$ docker build --pull -t rhel7/java:oracle-jdk8 oracle-jdk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 57.4%
  • Makefile 27.0%
  • Shell 6.7%
  • Roff 4.5%
  • Groovy 4.4%