Skip to content

Commit 0d3e177

Browse files
authored
Merge pull request #282 from arthurbarr/master
Fix POWER and z/Linux builds
2 parents d68c051 + 13f620f commit 0d3e177

File tree

4 files changed

+34
-19
lines changed

4 files changed

+34
-19
lines changed

Makefile-UBUNTU

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,18 @@ else
266266
build-sdk-ex: MQ_PACKAGES=MQSeriesRuntime-*.rpm MQSeriesSDK-*.rpm MQSeriesSamples*.rpm
267267
endif
268268
build-sdk-ex: docker-version docker-pull
269+
$(info $(shell printf $(TITLE)"Build $(MQ_IMAGE_SDK)"$(END)))
269270
$(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))
270271

271272
.PHONY: build-golang-sdk
272-
build-golang-sdk:
273-
$(DOCKER) build -t $(MQ_IMAGE_GOLANG_SDK) -f incubating/mq-golang-sdk/Dockerfile .
273+
build-golang-sdk: downloads/$(MQ_SDK_ARCHIVE) build-golang-sdk-ex
274+
275+
.PHONY: build-golang-sdk-ex
276+
build-golang-sdk-ex: docker-version build-sdk-ex
277+
$(info $(shell printf $(TITLE)"Build $(MQ_IMAGE_GOLANG_SDK)"$(END)))
278+
@echo hello
279+
$(DOCKER) build --build-arg BASE_IMAGE=$(MQ_IMAGE_SDK) -t $(MQ_IMAGE_GOLANG_SDK) -f incubating/mq-golang-sdk/Dockerfile .
280+
@echo goodbye
274281

275282
.PHONY: docker-pull
276283
docker-pull:

incubating/mq-golang-sdk/Dockerfile

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
ARG BASE_IMAGE=mq-sdk:9.1.1.0-x86_64-ubuntu-16.04
1416

15-
FROM golang:1.10
17+
FROM $BASE_IMAGE
1618

17-
# Install the MQ redistributable client (including header files) into the Go builder image
18-
RUN mkdir -p /opt/mqm \
19-
&& 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
20-
ENV CGO_CFLAGS="-I/opt/mqm/inc/" \
21-
CGO_LDFLAGS_ALLOW="-Wl,-rpath.*"
19+
COPY incubating/mq-golang-sdk/install-golang.sh /usr/local/bin
20+
21+
ENV GO_VERSION=1.10
22+
23+
ENV PATH="${PATH}:/usr/lib/go-${GO_VERSION}/bin:/go/bin:/usr/local/go/bin" \
24+
CGO_CFLAGS="-I/opt/mqm/inc/" \
25+
CGO_LDFLAGS_ALLOW="-Wl,-rpath.*" \
26+
GOPATH="/go"
27+
28+
# Install the Go compiler and Git
29+
RUN chmod +x /usr/local/bin/install-golang.sh \
30+
&& sleep 1 \
31+
&& install-golang.sh
32+
33+
WORKDIR $GOPATH

mq-advanced-server-rhel/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
This is a work-in-progress for a Docker image based on Red Hat Enterprise Linux (RHEL).
1+
# RHEL-based container build
22

3-
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.
4-
5-
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)).
6-
7-
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.
3+
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.

test/docker/docker_api_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestLicenseNotSet(t *testing.T) {
4747
containerConfig := container.Config{}
4848
id := runContainer(t, cli, &containerConfig)
4949
defer cleanContainer(t, cli, id)
50-
rc := waitForContainer(t, cli, id, 10*time.Second)
50+
rc := waitForContainer(t, cli, id, 20*time.Second)
5151
if rc != 1 {
5252
t.Errorf("Expected rc=1, got rc=%v", rc)
5353
}
@@ -65,7 +65,7 @@ func TestLicenseView(t *testing.T) {
6565
}
6666
id := runContainer(t, cli, &containerConfig)
6767
defer cleanContainer(t, cli, id)
68-
rc := waitForContainer(t, cli, id, 10*time.Second)
68+
rc := waitForContainer(t, cli, id, 20*time.Second)
6969
if rc != 1 {
7070
t.Errorf("Expected rc=1, got rc=%v", rc)
7171
}
@@ -324,7 +324,7 @@ func TestVolumeRequiresRoot(t *testing.T) {
324324
defer cleanContainer(t, cli, initCtr.ID)
325325
t.Logf("Init container ID=%v", initCtr.ID)
326326
startContainer(t, cli, initCtr.ID)
327-
rc = waitForContainer(t, cli, initCtr.ID, 10*time.Second)
327+
rc = waitForContainer(t, cli, initCtr.ID, 20*time.Second)
328328
if rc != 0 {
329329
t.Errorf("Expected init container to exit with rc=0, got rc=%v", rc)
330330
}
@@ -404,7 +404,7 @@ func TestStartQueueManagerFail(t *testing.T) {
404404
}
405405
id := runContainer(t, cli, &containerConfig)
406406
defer cleanContainer(t, cli, id)
407-
rc := waitForContainer(t, cli, id, 10*time.Second)
407+
rc := waitForContainer(t, cli, id, 20*time.Second)
408408
if rc != 1 {
409409
t.Errorf("Expected rc=1, got rc=%v", rc)
410410
}
@@ -752,7 +752,7 @@ func TestBadLogFormat(t *testing.T) {
752752
}
753753
id := runContainer(t, cli, &containerConfig)
754754
defer cleanContainer(t, cli, id)
755-
rc := waitForContainer(t, cli, id, 5*time.Second)
755+
rc := waitForContainer(t, cli, id, 20*time.Second)
756756
if rc != 1 {
757757
t.Errorf("Expected rc=1, got rc=%v", rc)
758758
}

0 commit comments

Comments
 (0)