Merge pull request #282 from arthurbarr/master

Fix POWER and z/Linux builds
This commit is contained in:
Rob Parker
2019-03-06 09:58:15 +00:00
committed by GitHub
4 changed files with 34 additions and 19 deletions

View File

@@ -266,11 +266,18 @@ else
build-sdk-ex: MQ_PACKAGES=MQSeriesRuntime-*.rpm MQSeriesSDK-*.rpm MQSeriesSamples*.rpm build-sdk-ex: MQ_PACKAGES=MQSeriesRuntime-*.rpm MQSeriesSDK-*.rpm MQSeriesSamples*.rpm
endif endif
build-sdk-ex: docker-version docker-pull build-sdk-ex: docker-version docker-pull
$(info $(shell printf $(TITLE)"Build $(MQ_IMAGE_SDK)"$(END)))
$(call docker-build-mq,$(MQ_IMAGE_SDK),incubating/mq-sdk/Dockerfile,$(MQ_SDK_ARCHIVE),"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers SDK (Non-Warranted)",$(MQ_VERSION)) $(call docker-build-mq,$(MQ_IMAGE_SDK),incubating/mq-sdk/Dockerfile,$(MQ_SDK_ARCHIVE),"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers SDK (Non-Warranted)",$(MQ_VERSION))
.PHONY: build-golang-sdk .PHONY: build-golang-sdk
build-golang-sdk: build-golang-sdk: downloads/$(MQ_SDK_ARCHIVE) build-golang-sdk-ex
$(DOCKER) build -t $(MQ_IMAGE_GOLANG_SDK) -f incubating/mq-golang-sdk/Dockerfile .
.PHONY: build-golang-sdk-ex
build-golang-sdk-ex: docker-version build-sdk-ex
$(info $(shell printf $(TITLE)"Build $(MQ_IMAGE_GOLANG_SDK)"$(END)))
@echo hello
$(DOCKER) build --build-arg BASE_IMAGE=$(MQ_IMAGE_SDK) -t $(MQ_IMAGE_GOLANG_SDK) -f incubating/mq-golang-sdk/Dockerfile .
@echo goodbye
.PHONY: docker-pull .PHONY: docker-pull
docker-pull: docker-pull:

View File

@@ -11,11 +11,23 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
ARG BASE_IMAGE=mq-sdk:9.1.1.0-x86_64-ubuntu-16.04
FROM golang:1.10 FROM $BASE_IMAGE
# Install the MQ redistributable client (including header files) into the Go builder image COPY incubating/mq-golang-sdk/install-golang.sh /usr/local/bin
RUN mkdir -p /opt/mqm \
&& curl -L https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.1.1.0-IBM-MQC-Redist-LinuxX64.tar.gz | tar -xz -C /opt/mqm ENV GO_VERSION=1.10
ENV CGO_CFLAGS="-I/opt/mqm/inc/" \
CGO_LDFLAGS_ALLOW="-Wl,-rpath.*" ENV PATH="${PATH}:/usr/lib/go-${GO_VERSION}/bin:/go/bin:/usr/local/go/bin" \
CGO_CFLAGS="-I/opt/mqm/inc/" \
CGO_LDFLAGS_ALLOW="-Wl,-rpath.*" \
GOPATH="/go"
# Install the Go compiler and Git
RUN chmod +x /usr/local/bin/install-golang.sh \
&& sleep 1 \
&& install-golang.sh
WORKDIR $GOPATH

View File

@@ -1,7 +1,3 @@
This is a work-in-progress for a Docker image based on Red Hat Enterprise Linux (RHEL). # RHEL-based container build
The current MQ container build requires Docker V17.05 or greater (required features include multi-stage Docker build, and "ARG"s in the "FROM" statement). Red Hat Enterprise Linux V7.5 includes Docker up to version V1.13. Build scripts for building a container image based on Red Hat Enterprise Linux (RHEL), using the [`buildah`](https://github.com/containers/buildah) tool. buildah is supported on RHEL V7.5 and greater.
In order to build images with Red Hat Enterprise Linux, license registration is required. The license of the host server can be used, as long as you either use Red Hat's patched version of Docker (which is an old version), or if you use alternative container management tools such as [`buildah`](https://github.com/projectatomic/buildah/) and `podman` (from [`libpod`](https://github.com/projectatomic/libpod)).
This directory contains scripts for building with `buildah`. The build itself isn't containerized, so more software than usual is needed on the RHEL host, so an Ansible playbook is also provided to help set up the host.

View File

@@ -47,7 +47,7 @@ func TestLicenseNotSet(t *testing.T) {
containerConfig := container.Config{} containerConfig := container.Config{}
id := runContainer(t, cli, &containerConfig) id := runContainer(t, cli, &containerConfig)
defer cleanContainer(t, cli, id) defer cleanContainer(t, cli, id)
rc := waitForContainer(t, cli, id, 10*time.Second) rc := waitForContainer(t, cli, id, 20*time.Second)
if rc != 1 { if rc != 1 {
t.Errorf("Expected rc=1, got rc=%v", rc) t.Errorf("Expected rc=1, got rc=%v", rc)
} }
@@ -65,7 +65,7 @@ func TestLicenseView(t *testing.T) {
} }
id := runContainer(t, cli, &containerConfig) id := runContainer(t, cli, &containerConfig)
defer cleanContainer(t, cli, id) defer cleanContainer(t, cli, id)
rc := waitForContainer(t, cli, id, 10*time.Second) rc := waitForContainer(t, cli, id, 20*time.Second)
if rc != 1 { if rc != 1 {
t.Errorf("Expected rc=1, got rc=%v", rc) t.Errorf("Expected rc=1, got rc=%v", rc)
} }
@@ -324,7 +324,7 @@ func TestVolumeRequiresRoot(t *testing.T) {
defer cleanContainer(t, cli, initCtr.ID) defer cleanContainer(t, cli, initCtr.ID)
t.Logf("Init container ID=%v", initCtr.ID) t.Logf("Init container ID=%v", initCtr.ID)
startContainer(t, cli, initCtr.ID) startContainer(t, cli, initCtr.ID)
rc = waitForContainer(t, cli, initCtr.ID, 10*time.Second) rc = waitForContainer(t, cli, initCtr.ID, 20*time.Second)
if rc != 0 { if rc != 0 {
t.Errorf("Expected init container to exit with rc=0, got rc=%v", rc) t.Errorf("Expected init container to exit with rc=0, got rc=%v", rc)
} }
@@ -404,7 +404,7 @@ func TestStartQueueManagerFail(t *testing.T) {
} }
id := runContainer(t, cli, &containerConfig) id := runContainer(t, cli, &containerConfig)
defer cleanContainer(t, cli, id) defer cleanContainer(t, cli, id)
rc := waitForContainer(t, cli, id, 10*time.Second) rc := waitForContainer(t, cli, id, 20*time.Second)
if rc != 1 { if rc != 1 {
t.Errorf("Expected rc=1, got rc=%v", rc) t.Errorf("Expected rc=1, got rc=%v", rc)
} }
@@ -752,7 +752,7 @@ func TestBadLogFormat(t *testing.T) {
} }
id := runContainer(t, cli, &containerConfig) id := runContainer(t, cli, &containerConfig)
defer cleanContainer(t, cli, id) defer cleanContainer(t, cli, id)
rc := waitForContainer(t, cli, id, 5*time.Second) rc := waitForContainer(t, cli, id, 20*time.Second)
if rc != 1 { if rc != 1 {
t.Errorf("Expected rc=1, got rc=%v", rc) t.Errorf("Expected rc=1, got rc=%v", rc)
} }