Commit df1a10f6 authored by Adelina Eleonora Lintuluoto's avatar Adelina Eleonora Lintuluoto
Browse files

Merge branch 'base_images' into 'master'

Move all base images and references to cmscloud/cms-cloud, making the CERN...

See merge request cms-cloud/cmssw-docker!16
parents 900a9fbc 18d6f46e
......@@ -4,12 +4,12 @@ Dockerfiles for CMSSW
There are different sets of Dockerfiles in this repository:
- [standalone](standalone) images [![standalone container badge](https://images.microbadger.com/badges/image/clelange/cmssw.svg)](https://microbadger.com/images/clelange/cmssw)
- [cc7-cvmfs](cc7-cvmfs)-based images [![cc7-cvmfs container badge](https://images.microbadger.com/badges/image/clelange/cc7-cmssw-cvmfs.svg)](https://microbadger.com/images/clelange/cc7-cmssw-cvmfs) [![cc7-cvmfs container version](https://images.microbadger.com/badges/version/clelange/cc7-cmssw-cvmfs.svg)](https://microbadger.com/images/clelange/cc7-cmssw-cvmfs)
- [slc6-cvmfs](slc6-cvmfs)-based images [![slc6-cvmfs container badge](https://images.microbadger.com/badges/image/clelange/slc6-cmssw-cvmfs.svg)](https://microbadger.com/images/clelange/slc6-cmssw-cvmfs) [![slc6-cvmfs container version](https://images.microbadger.com/badges/version/clelange/slc6-cmssw-cvmfs.svg)](https://microbadger.com/images/clelange/slc6-cmssw-cvmfs)
- [cc7-cms](cc7-cms) images [![cc7-cms container badge](https://images.microbadger.com/badges/image/clelange/cc7-cms.svg)](https://microbadger.com/images/clelange/cc7-cms) [![cc7-cms container version](https://images.microbadger.com/badges/version/clelange/cc7-cms.svg)](https://microbadger.com/images/clelange/cc7-cms)
- [slc6-cms](slc6-cms) images [![slc6-cms container badge](https://images.microbadger.com/badges/image/clelange/slc6-cms.svg)](https://microbadger.com/images/clelange/slc6-cms) [![slc6-cms container version](https://images.microbadger.com/badges/version/clelange/slc6-cms.svg)](https://microbadger.com/images/clelange/slc6-cms)
- [slc5-cms](slc5-cms) images [![slc5-cms container badge](https://images.microbadger.com/badges/image/clelange/slc5-cms.svg)](https://microbadger.com/images/clelange/slc5-cms) [![slc5-cms container version](https://images.microbadger.com/badges/version/clelange/slc5-cms.svg)](https://microbadger.com/images/clelange/slc5-cms)
- [standalone](standalone) images
- [cc7-cvmfs](cc7-cvmfs)-based images [![cc7-cvmfs container badge](https://images.microbadger.com/badges/image/cmscloud/cc7-cmssw-cvmfs.svg)](https://microbadger.com/images/cmscloud/cc7-cvmfs) [![cc7-cvmfs container version](https://images.microbadger.com/badges/version/cmscloud/cc7-cvmfs.svg)](https://microbadger.com/images/cmscloud/cc7-cvmfs)
- [slc6-cvmfs](slc6-cvmfs)-based images [![slc6-cvmfs container badge](https://images.microbadger.com/badges/image/cmscloud/slc6-cvmfs.svg)](https://microbadger.com/images/cmscloud/slc6-cvmfs) [![slc6-cvmfs container version](https://images.microbadger.com/badges/version/cmscloud/slc6-cvmfs.svg)](https://microbadger.com/images/cmscloud/slc6-cvmfs)
- [cc7-cms](cc7-cms) images [![cc7-cms container badge](https://images.microbadger.com/badges/image/cmscloud/cc7-cms.svg)](https://microbadger.com/images/cmscloud/cc7-cms) [![cc7-cms container version](https://images.microbadger.com/badges/version/cmscloud/cc7-cms.svg)](https://microbadger.com/images/cmscloud/cc7-cms)
- [slc6-cms](slc6-cms) images [![slc6-cms container badge](https://images.microbadger.com/badges/image/cmscloud/slc6-cms.svg)](https://microbadger.com/images/cmscloud/slc6-cms) [![slc6-cms container version](https://images.microbadger.com/badges/version/cmscloud/slc6-cms.svg)](https://microbadger.com/images/cmscloud/slc6-cms)
- [slc5-cms](slc5-cms) images [![slc5-cms container badge](https://images.microbadger.com/badges/image/cmscloud/slc5-cms.svg)](https://microbadger.com/images/cmscloud/slc5-cms) [![slc5-cms container version](https://images.microbadger.com/badges/version/cmscloud/slc5-cms.svg)](https://microbadger.com/images/cmscloud/slc5-cms)
The non-standalone images need a network connection, and can be slow, since CMSSW is loaded via the network. The advantage is that they are much smaller (few hundreds of MB) while the standalone images contain the full CMSSW release (>= 15 GB).
......@@ -24,8 +24,8 @@ The images are based on different sets of CERN Linux distributions:
Change to the directory containing the `Dockerfile`s and execute one of the following commands. `Makefile`s are available to build the images. For properly tagging the containers and the `docker_push` to work you need to `docker login` to the container registry of your preference and pass additional parameters to the `make docker_push` command. The current default for the standalone images at the moment is:
```shell
DOCKER_IMAGE ?= clelange/cmssw
CERN_IMAGE ?= gitlab-registry.cern.ch/clange/cmssw-docker/cmssw_$(BASE_VERSION)
DOCKER_IMAGE ?= cmscloud/cmssw
CERN_IMAGE ?= gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cmssw_$(BASE_VERSION)-$(SCRAM_ARCH)
```
where `$(BASE_VERSION)` is extracted automatically from the CMSSW release version, e.g. `5_3_32` for `CMSSW_5_3_32`.
......@@ -51,8 +51,8 @@ make docker_push CMSSW_VERSION=CMSSW_7_1_25_patch5 SCRAM_ARCH=slc6_amd64_gcc481
Releases for other Linux distribution than SLC6 (here e.g. SLC5):
```shell
make CMSSW_VERSION=CMSSW_4_2_8 SCRAM_ARCH=slc5_amd64_gcc434 BASEIMAGE=clelange/slc5-cms:latest
make docker_push CMSSW_VERSION=CMSSW_4_2_8 SCRAM_ARCH=slc5_amd64_gcc434 BASEIMAGE=clelange/slc5-cms:latest
make CMSSW_VERSION=CMSSW_4_2_8 SCRAM_ARCH=slc5_amd64_gcc434 BASEIMAGE=gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc5-cms:latest
make docker_push CMSSW_VERSION=CMSSW_4_2_8 SCRAM_ARCH=slc5_amd64_gcc434 BASEIMAGE=gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc5-cms:latest
```
### Building CVMFS versions
......@@ -75,28 +75,22 @@ make docker_push
## Running containers
All images are available in [docker hub](http://hub.docker.com/r/clelange/) as well as in the [CERN GitLab container registry](https://gitlab.cern.ch/clange/cmssw-docker/container_registry). In order to use these images, the run commands below need to be changed replacing `clelange` by `gitlab-registry.cern.ch/clange/cmssw-docker`. For the standalone images the image name needs to be adjust as well, see example below.
All base images are available in [docker hub](http://hub.docker.com/r/cmscloud/) as well as in the [CERN GitLab container registry](https://gitlab.cern.ch/cms-cloud/cmssw-docker/container_registry), which in addition contains a selection of standalone images. We recommend using the CERN registry by default. In order to use the images on docker hub, the run commands below need to be changed replacing `gitlab-registry.cern.ch/cmscloud/cmssw-docker` by `cmscloud`. For the standalone images the image name needs to be adjust as well, see example below.
### Running the standalone version
Currently supported for automatic CMSSW setup are `bash` and `zsh`.
Currently supported for automatic CMSSW setup are `bash` and `zsh`. _These images are only available at the [CERN registry](https://gitlab.cern.ch/cms-cloud/cmssw-docker/container_registry/eyJuYW1lIjoiY21zLWNsb3VkL2Ntc3N3LWRvY2tlci9jbXNzdyIsInRhZ3NfcGF0aCI6Ii9jbXMtY2xvdWQvY21zc3ctZG9ja2VyL3JlZ2lzdHJ5L3JlcG9zaXRvcnkvNzE0OC90YWdzP2Zvcm1hdD1qc29uIiwiaWQiOjcxNDh9)!_ Please check which ones exactly are available before executing the commands below.
`bash`:
```shell
docker run --rm -it clelange/cmssw:9_2_1 /bin/bash
docker run --rm -it gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cmssw_10_1_1-slc6_amd64_gcc630:2020-07-15-b57de653 /bin/bash
```
`zsh`:
```shell
docker run --rm -it clelange/cmssw:9_2_1 /bin/zsh
```
Example for CERN GitLab container registry:
```shell
docker run --rm -it gitlab-registry.cern.ch/clange/cmssw-docker/cmssw_9_2_1 /bin/zsh
docker run --rm -it gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cmssw_10_1_1-slc6_amd64_gcc630:2020-07-15-b57de653 /bin/zsh
```
### Running the CVMFS version
......@@ -104,7 +98,7 @@ docker run --rm -it gitlab-registry.cern.ch/clange/cmssw-docker/cmssw_9_2_1 /bin
Setting up CVMFS uses `fuse`, which needs special rights from docker:
```shell
docker run --rm --cap-add SYS_ADMIN --device /dev/fuse -it clelange/slc6-cmssw-cvmfs /bin/bash
docker run --rm --cap-add SYS_ADMIN --device /dev/fuse -it gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cvmfs /bin/bash
```
Alternatively, one can also just use `--privileged` instead of `--cap-add SYS_ADMIN --device /dev/fuse`, see the [Docker run reference](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities).
......@@ -128,19 +122,19 @@ This can be changed permanently by editing `/etc/selinux/config`, setting `SELIN
On a machine that has `/cvmfs` mounted (and available to the docker process):
```shell
docker run --rm -it -v /cvmfs:/cvmfs clelange/slc6-cms /bin/zsh
docker run --rm -it -v /cvmfs:/cvmfs gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc6-cms /bin/zsh
```
On CERN OpenStack (see [OpenStack CVMFS documentation](http://clouddocs.web.cern.ch/clouddocs/containers/tutorials/cvmfs.html)):
```shell
docker run --rm -it --volume-driver cvmfs -v cms.cern.ch:/cvmfs/cms.cern.ch clelange/cms-slc6 /bin/zsh
docker run --rm -it --volume-driver cvmfs -v cms.cern.ch:/cvmfs/cms.cern.ch gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc6-cms /bin/zsh
```
and for the CMS OpenData extend this to:
and for CMS OpenData usage extend this to:
```shell
docker run --rm -it --volume-driver cvmfs -v cms.cern.ch:/cvmfs/cms.cern.ch -v cms-opendata-conddb.cern.ch:/cvmfs/cms-opendata-conddb.cern.ch clelange/cms-slc6 /bin/zsh
docker run --rm -it --volume-driver cvmfs -v cms.cern.ch:/cvmfs/cms.cern.ch -v cms-opendata-conddb.cern.ch:/cvmfs/cms-opendata-conddb.cern.ch gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc6-cms /bin/zsh
```
## Grid proxy
......
......@@ -7,8 +7,8 @@ build: docker_build output
release: docker_build docker_push output
# Image can be overidden with env var.
DOCKER_IMAGE ?= clelange/cc7-cms
CERN_IMAGE ?= gitlab-registry.cern.ch/clange/cmssw-docker/cc7-cms
DOCKER_IMAGE ?= cmscloud/cc7-cms
CERN_IMAGE ?= gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cvmfs
# Get the latest commit.
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
......
# A container where CernVM-FS is up and running for CMSSW
# Make the base image configurable:
ARG BASEIMAGE=clelange/cc7-cms:latest
ARG BASEIMAGE=gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cms:latest
# Set up the SLC6 CMSSW base:
FROM ${BASEIMAGE}
......
......@@ -7,8 +7,8 @@ build: docker_build output
release: docker_build docker_push output
# Image can be overidden with env var.
DOCKER_IMAGE ?= clelange/cc7-cmssw-cvmfs
CERN_IMAGE ?= gitlab-registry.cern.ch/clange/cmssw-docker/cc7-cmssw-cvmfs
DOCKER_IMAGE ?= cmscloud/cc7-cvmfs
CERN_IMAGE ?= gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cvmfs
# Get the latest commit.
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
......
......@@ -7,8 +7,8 @@ build: docker_build output
release: docker_build docker_push output
# Image can be overidden with env var.
DOCKER_IMAGE ?= clelange/slc5-cms
CERN_IMAGE ?= gitlab-registry.cern.ch/clange/cmssw-docker/slc5-cms
DOCKER_IMAGE ?= cmscloud/slc5-cms
CERN_IMAGE ?= gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc5-cms
# Get the latest commit.
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
......
......@@ -7,8 +7,8 @@ build: docker_build output
release: docker_build docker_push output
# Image can be overidden with env var.
DOCKER_IMAGE ?= clelange/slc6-cms
CERN_IMAGE ?= gitlab-registry.cern.ch/clange/cmssw-docker/slc6-cms
DOCKER_IMAGE ?= cmscloud/slc6-cms
CERN_IMAGE ?= gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc6-cms
# Get the latest commit.
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
......
# A container where CernVM-FS is up and running for CMSSW
# Make the base image configurable:
ARG BASEIMAGE=clelange/slc6-cms:latest
ARG BASEIMAGE=gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc6-cms:latest
# Set up the SLC6 CMSSW base:
FROM ${BASEIMAGE}
......
......@@ -7,8 +7,8 @@ build: docker_build output
release: docker_build docker_push output
# Image can be overidden with env var.
DOCKER_IMAGE ?= clelange/slc6-cmssw-cvmfs
CERN_IMAGE ?= gitlab-registry.cern.ch/clange/cmssw-docker/slc6-cmssw-cvmfs
DOCKER_IMAGE ?= cmscloud/slc6-cvmfs
CERN_IMAGE ?= gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc6-cvmfs
# Get the latest commit.
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
......
# A container containing a specific CMSSW release
# Make the base image configurable:
ARG BASEIMAGE=clelange/slc6-cms:latest
ARG BASEIMAGE=gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc6-cms:latest
# Set up the SLC6 CMSSW base:
FROM ${BASEIMAGE}
......
......@@ -9,15 +9,15 @@ release: docker_build docker_push output
# variables need to be overwritten
SCRAM_ARCH=slc6_amd64_gcc481
CMSSW_VERSION=CMSSW_7_1_25_patch5
BASEIMAGE=clelange/slc6-cms:latest
BASEIMAGE=gitlab-registry.cern.ch/cms-cloud/cmssw-docker/slc6-cms
# function to return base version
get_version = $(strip $(subst CMSSW_, ,$1))
BASE_VERSION = $(call get_version,$(CMSSW_VERSION))
# Image can be overidden with env var.
DOCKER_IMAGE ?= clelange/cmssw
CERN_IMAGE ?= gitlab-registry.cern.ch/clange/cmssw-docker/cmssw_$(BASE_VERSION)
DOCKER_IMAGE ?= cmscloud/cmssw
CERN_IMAGE ?= gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cmssw_$(BASE_VERSION)-$(SCRAM_ARCH)
# Get the latest commit.
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment