From 31f604cc47fd56d0504bf7f2fc3ad4734d8aedbc Mon Sep 17 00:00:00 2001 From: Arthur Barr Date: Mon, 1 Oct 2018 15:06:51 +0100 Subject: [PATCH] Document build prereqs for RHEL --- docs/building.md | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/docs/building.md b/docs/building.md index 33dda86..3a3dd7b 100644 --- a/docs/building.md +++ b/docs/building.md @@ -1,18 +1,38 @@ -# Building a Docker image +# Building a container image ## Prerequisites + +### Prerequisites for building an Ubuntu image +If you want to build a container image with Ubuntu Linux as the base OS, then you need to have the following tools installed: + You need to ensure you have the following tools installed: * [Docker](https://www.docker.com/) V17.06.1 or later * [GNU make](https://www.gnu.org/software/make/) If you are working in the Windows Subsystem for Linux, follow [this guide by Microsoft to set up Docker](https://blogs.msdn.microsoft.com/commandline/2017/12/08/cross-post-wsl-interoperability-with-docker/) first. +### Prerequisites for building a Red Hat Enterprise Linux image +If you want to build a container image with Red Hat Enterprise Linux as the base OS, then you need to use a host server with Red Hat Enterprise Linux. You must also have the following tools installed: + +* `[buildah](https://buildah.io)` (available in `rhel-7-server-extras`) +* `[podman](https://podman.io)` (available in `rhel-7-server-extras`) + +In addition, you need the following commonly installed tools: + +* `bash` +* `coreutils` +* `findutils` +* `make` +* `sed` +* `shadow-utils` +* `tar` + ## Building a production image This procedure works for building the MQ Continuous Delivery release, on `x86_64`, `ppc64le` and `s390x` architectures. 1. Create a `downloads` directory in the root of this repository 2. Download MQ from IBM Passport Advantage, and place the downloaded file (for example, `IBM_MQ_9.1.0.0_UBUNTU_X86-64.tar.gz` for MQ V9.1.0 for Ubuntu on x86_64 architecture) in the `downloads` directory -2. Run `make build-advancedserver` +2. Run `make build-advancedserver-ubuntu` or `make build-advancedserver-rhel` > **Warning**: Note that MQ offers two different sets of packaging on Linux: one is called "MQ for Linux" and contains RPM files for installing on Red Hat Enterprise Linux and SUSE Linux Enterprise Server. The other package is called "MQ for Ubuntu", and contains DEB files for installing on Ubuntu. @@ -29,22 +49,10 @@ MQ_ARCHIVE=mq-1.2.3.4.tar.gz MQ_VERSION=1.2.3.4 make build-advancedserver ``` ## Building a developer image -Run `make build-devserver`, which will download the latest version of MQ Advanced for Developers from IBM developerWorks. This is currently only available on the `x86_64` architecture. +Run `make build-devserver-ubuntu` or `make build-devserver-rhel`, which will download the latest version of MQ Advanced for Developers from IBM developerWorks. This is currently only available on the `x86_64` architecture. You can use the environment variable `MQ_ARCHIVE_DEV` to specify an alternative local file to install from (which must be in the `downloads` directory). -## Building on a different base image -By default, the MQ images use Ubuntu as the base layer. You can build using a Red Hat Enterprise Linux compatible base layer by setting the `BASE_IMAGE` environment variable. For example: - -``` -BASE_IMAGE=centos:7 make build-advancedserver -``` - -The `make` tool will try and locate the right archive file under the `downloads` directory, based on your platform architecture and your `MQ_VERSION` environment variable, for example `IBM_MQ_9.1.0.0_LINUX_X86_64.tar.gz` for MQ V9.1.0.0 on x86_64. You can also set the `MQ_ARCHIVE` environment variable to set the specific file name. - -Note that if you are using Red Hat Enterprise Linux, you will need to create your own base image layer, with your subscription enabled, as described [here](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/getting_started_with_containers/get_started_with_docker_formatted_container_images). The MQ image build needs to install some additional packages, and a subscription is required to access the Red Hat repositories. - - ## Installed components -This image includes the core MQ server, Java, language packs, and GSKit. This can be configured by setting the `MQ_PACKAGES` argument to `make`, or directly as a [Docker build argument](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables-build-arg). +This image includes the core MQ server, Java, language packs, and GSKit. This can be configured by setting the `MQ_PACKAGES` argument to `make`. For the Ubuntu-based image, you can also directly set a [Docker build argument](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables-build-arg).