This commit is contained in:
2018-12-13 19:33:04 +01:00
parent 5088116365
commit bc74cdd9f0
4 changed files with 15 additions and 11 deletions

View File

@@ -4,13 +4,15 @@ RUN apt-get update -yy && \
RUN curl -s https://storage.googleapis.com/golang/go1.11.2.linux-amd64.tar.gz | tar -C /usr/local -xzf - RUN curl -s https://storage.googleapis.com/golang/go1.11.2.linux-amd64.tar.gz | tar -C /usr/local -xzf -
ENV GOPATH=/go ENV GOPATH=/go
ENV CGO_LDFLAGS_ALLOW=".*"
ENV CGO_CFLAGS_ALLOW=".*"
ENV PATH=$PATH:/usr/local/go/bin:/go/bin ENV PATH=$PATH:/usr/local/go/bin:/go/bin
RUN mkdir -p /go/bin RUN mkdir -p /go/bin
ADD . /go/src/git.deineagentur.com/DeineAgenturUG/go-xmlsec ADD . /go/src/git.deineagentur.com/DeineAgenturUG/go-xmlsec
WORKDIR /go/src/git.deineagentur.com/DeineAgenturUG/go-xmlsec WORKDIR /go/src/git.deineagentur.com/DeineAgenturUG/go-xmlsec
RUN go get github.com/crewjam/errset RUN go get github.com/crewjam/errset
RUN go build -o /bin/xmldsig ./examples/xmldsig.go RUN go build -v -o /bin/xmldsig ./examples/xmldsig.go
# Check our dynamic library dependencies. This will produce output like: # Check our dynamic library dependencies. This will produce output like:
# #

View File

@@ -4,11 +4,13 @@ RUN apt-get update -yy && \
RUN curl -s https://storage.googleapis.com/golang/go1.11.2.linux-amd64.tar.gz | tar -C /usr/local -xzf - RUN curl -s https://storage.googleapis.com/golang/go1.11.2.linux-amd64.tar.gz | tar -C /usr/local -xzf -
ENV GOPATH=/go ENV GOPATH=/go
ENV CGO_LDFLAGS_ALLOW=".*"
ENV CGO_CFLAGS_ALLOW=".*"
ENV PATH=$PATH:/usr/local/go/bin:/go/bin ENV PATH=$PATH:/usr/local/go/bin:/go/bin
RUN mkdir -p /go/bin RUN mkdir -p /go/bin
RUN curl -sL ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz | tar -xzf - && \ RUN curl -sL ftp://xmlsoft.org/libxml2/libxml2-2.9.8.tar.gz | tar -xzf - && \
cd /libxml2-2.9.4 && \ cd /libxml2-2.9.8 && \
./configure \ ./configure \
--enable-static \ --enable-static \
--disable-shared \ --disable-shared \
@@ -53,8 +55,8 @@ RUN curl -sL ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz | tar -xzf - && \
--without-coverage && \ --without-coverage && \
make install make install
RUN curl -sL ftp://ftp.openssl.org/source/openssl-1.0.2j.tar.gz | tar -xzf - && \ RUN curl -sL ftp://ftp.openssl.org/source/openssl-1.0.2q.tar.gz | tar -xzf - && \
cd openssl-1.0.2j && \ cd openssl-1.0.2q && \
./config \ ./config \
no-shared \ no-shared \
no-weak-ssl-ciphers \ no-weak-ssl-ciphers \
@@ -68,8 +70,8 @@ RUN curl -sL ftp://ftp.openssl.org/source/openssl-1.0.2j.tar.gz | tar -xzf - &&
no-dso && \ no-dso && \
make depend install make depend install
RUN curl -sL http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.22.tar.gz | tar -xzf - && \ RUN curl -sL http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.27.tar.gz | tar -xzf - && \
cd xmlsec1-1.2.22 && \ cd xmlsec1-1.2.27 && \
./configure \ ./configure \
--enable-static \ --enable-static \
--disable-shared \ --disable-shared \
@@ -92,6 +94,6 @@ RUN curl -sL http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.22.tar.gz | tar
ADD . /go/src/git.deineagentur.com/DeineAgenturUG/go-xmlsec ADD . /go/src/git.deineagentur.com/DeineAgenturUG/go-xmlsec
WORKDIR /go/src/git.deineagentur.com/DeineAgenturUG/go-xmlsec WORKDIR /go/src/git.deineagentur.com/DeineAgenturUG/go-xmlsec
RUN go get github.com/crewjam/errset RUN go get github.com/crewjam/errset
RUN go build -tags static -ldflags '-s -extldflags "-static"' -o /bin/xmldsig ./examples/xmldsig.go RUN go build -v -tags static -ldflags '-s -w -extldflags "-static" -v' -o /bin/xmldsig ./examples/xmldsig.go
RUN ldd /bin/xmldsig || true RUN ldd /bin/xmldsig || true
RUN /bin/xmldsig --help || true RUN /bin/xmldsig --help || true

View File

@@ -14,7 +14,7 @@ SHELL=/bin/bash
CVSPATH=git.deineagentur.com/DeineAgenturUG/go-xmlsec CVSPATH=git.deineagentur.com/DeineAgenturUG/go-xmlsec
# Project vendor # Project vendor
VENDOR=miracl VENDOR=DeineAgenturUG
# Project name # Project name
PROJECT=go-xmlsec PROJECT=go-xmlsec

View File

@@ -6,8 +6,8 @@ import "unsafe"
// brew install libxmlsec1 libxml2 // brew install libxmlsec1 libxml2
// brew link libxml2 --force // brew link libxml2 --force
// #cgo CFLAGS: -DXMLSEC_CRYPTO_OPENSSL -UXMLSEC_CRYPTO_DYNAMIC_LOADING // #cgo CFLAGS: -DXMLSEC_CRYPTO_OPENSSL=1 -UXMLSEC_CRYPTO_DYNAMIC_LOADING
// #cgo LDFLAGS: -lxmlsec1-openssl // #cgo LDFLAGS: -lxmlsec1-openssl -lxmlsec1 -lssl -lcrypto
// #include <xmlsec/xmlsec.h> // #include <xmlsec/xmlsec.h>
// #include <xmlsec/xmltree.h> // #include <xmlsec/xmltree.h>
// #include <xmlsec/xmlenc.h> // #include <xmlsec/xmlenc.h>