From 925ac9f626c6b5fd7e941f7e8e768ce7263275b0 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Thu, 25 Jan 2024 17:10:04 +0100 Subject: [PATCH 1/4] feat: add DB2 CLI libraries --- go/base/Dockerfile.tmpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/go/base/Dockerfile.tmpl b/go/base/Dockerfile.tmpl index f0f5c156..85044ed2 100644 --- a/go/base/Dockerfile.tmpl +++ b/go/base/Dockerfile.tmpl @@ -59,6 +59,11 @@ RUN curl -sSLO https://storage.googleapis.com/obs-ci-cache/beats/libpcap-1.8.1.t && tar -xzf libpcap-1.8.1.tar.gz -C /libpcap \ && rm libpcap-1.8.1.tar.gz +RUN go install github.com/ibmdb/go_ibm_db/installer@v0.4.5 \ + && cd ${GOPATH}/pkg/mod/github.com/ibmdb/go_ibm_db\@v0.4.5/installer \ + && go run setup.go + +RUN ENV GOLANG_CROSSBUILD=1 VOLUME /app From 20dc519b68010cebcd5f411c1a0316db4ee1813c Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Thu, 25 Jan 2024 17:17:13 +0100 Subject: [PATCH 2/4] Apply suggestions from code review --- go/base/Dockerfile.tmpl | 2 -- 1 file changed, 2 deletions(-) diff --git a/go/base/Dockerfile.tmpl b/go/base/Dockerfile.tmpl index 85044ed2..ac627071 100644 --- a/go/base/Dockerfile.tmpl +++ b/go/base/Dockerfile.tmpl @@ -63,8 +63,6 @@ RUN go install github.com/ibmdb/go_ibm_db/installer@v0.4.5 \ && cd ${GOPATH}/pkg/mod/github.com/ibmdb/go_ibm_db\@v0.4.5/installer \ && go run setup.go -RUN - ENV GOLANG_CROSSBUILD=1 VOLUME /app WORKDIR /app From 9c69f3a179cc2cd0744da900f74c91fa38777839 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Fri, 26 Jan 2024 11:41:24 +0100 Subject: [PATCH 3/4] fix: move the install to the main Docker image --- go/base/Dockerfile.tmpl | 4 ---- go/main/Dockerfile.tmpl | 8 ++++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go/base/Dockerfile.tmpl b/go/base/Dockerfile.tmpl index ac627071..9010cfde 100644 --- a/go/base/Dockerfile.tmpl +++ b/go/base/Dockerfile.tmpl @@ -59,10 +59,6 @@ RUN curl -sSLO https://storage.googleapis.com/obs-ci-cache/beats/libpcap-1.8.1.t && tar -xzf libpcap-1.8.1.tar.gz -C /libpcap \ && rm libpcap-1.8.1.tar.gz -RUN go install github.com/ibmdb/go_ibm_db/installer@v0.4.5 \ - && cd ${GOPATH}/pkg/mod/github.com/ibmdb/go_ibm_db\@v0.4.5/installer \ - && go run setup.go - ENV GOLANG_CROSSBUILD=1 VOLUME /app WORKDIR /app diff --git a/go/main/Dockerfile.tmpl b/go/main/Dockerfile.tmpl index fcadadea..fbadf49c 100644 --- a/go/main/Dockerfile.tmpl +++ b/go/main/Dockerfile.tmpl @@ -27,7 +27,7 @@ RUN apt install -y --no-install-recommends --allow-unauthenticated\ libxml2-dev \ libsqlite3-dev -# For Debian 11 libsystemd-dev must be 247.3-7+deb11u4 because of preinstalled libsystemd0:247.3-7+deb11u4 +# For Debian 11 libsystemd-dev must be 247.3-7+deb11u4 because of preinstalled libsystemd0:247.3-7+deb11u4 # See https://github.com/elastic/golang-crossbuild/pull/316 RUN apt install -y --no-install-recommends --allow-unauthenticated\ libsystemd-dev{{- if eq .DEBIAN_VERSION "11" }}=247.3-7+deb11u4{{- end }} @@ -77,6 +77,10 @@ RUN curl -sSLO https://storage.googleapis.com/obs-ci-cache/beats/WpdPack_4_1_2.z --output-lib /libpcap/win/WpdPack/Lib/x64/libwpcap.a \ --input-def /libpcap/win/WpdPack/wpcap.def +RUN go install github.com/ibmdb/go_ibm_db/installer@v0.4.5 \ + && cd ${GOPATH}/pkg/mod/github.com/ibmdb/go_ibm_db\@v0.4.5/installer \ + && go run setup.go + # Build-time metadata as defined at http://label-schema.org. ARG BUILD_DATE ARG IMAGE @@ -86,4 +90,4 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.name=$IMAGE \ org.label-schema.vcs-ref=$VCS_REF \ org.label-schema.vcs-url=$VCS_URL \ - org.label-schema.schema-version="1.0" \ No newline at end of file + org.label-schema.schema-version="1.0" From 1fce68f56920ff4199b114094b72381b0dd3a8ad Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Fri, 26 Jan 2024 11:56:38 +0100 Subject: [PATCH 4/4] Apply suggestions from code review --- go/main/Dockerfile.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/go/main/Dockerfile.tmpl b/go/main/Dockerfile.tmpl index fbadf49c..486d2fe6 100644 --- a/go/main/Dockerfile.tmpl +++ b/go/main/Dockerfile.tmpl @@ -81,6 +81,7 @@ RUN go install github.com/ibmdb/go_ibm_db/installer@v0.4.5 \ && cd ${GOPATH}/pkg/mod/github.com/ibmdb/go_ibm_db\@v0.4.5/installer \ && go run setup.go + # Build-time metadata as defined at http://label-schema.org. ARG BUILD_DATE ARG IMAGE