-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.export_worker
More file actions
106 lines (101 loc) · 2.89 KB
/
Dockerfile.export_worker
File metadata and controls
106 lines (101 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# build
FROM golang:1.8.3-alpine3.6 AS build-env
RUN apk update && apk upgrade && apk add --no-cache bash git openssh curl g++ make perl && \
mkdir -p /go/src/github.com/markwallsgrove/saml_federation_proxy/export_worker
WORKDIR /
RUN curl -sL ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz | tar -xzf - && \
cd /libxml2-2.9.4 && \
./configure \
--enable-static \
--disable-shared \
--without-gnu-ld \
--with-c14n \
--without-catalog \
--without-debug \
--without-docbook \
--without-fexceptions \
--without-ftp \
--without-history \
--without-html \
--without-http \
--without-iconv \
--without-icu \
--without-iso8859x \
--without-legacy \
--without-mem-debug \
--without-minimum \
--with-output \
--without-pattern \
--with-push \
--without-python \
--without-reader \
--without-readline \
--without-regexps \
--without-run-debug \
--with-sax1 \
--without-schemas \
--without-schematron \
--without-threads \
--without-thread-alloc \
--with-tree \
--without-valid \
--without-writer \
--without-xinclude \
--without-xpath \
--with-xptr \
--without-modules \
--without-zlib \
--without-lzma \
--without-coverage && \
make install
RUN \
curl -sL ftp://ftp.openssl.org/source/openssl-1.0.2l.tar.gz | tar -xzf - && \
cd openssl-1.0.2l && \
./config \
no-shared \
no-weak-ssl-ciphers \
no-ssl2 \
no-ssl3 \
no-comp \
no-idea \
no-dtls \
no-hw \
no-threads \
no-dso && \
make depend install
RUN curl -sL http://www.aleksey.com/xmlsec/download/xmlsec1-1.2.22.tar.gz | tar -xzf - && \
cd xmlsec1-1.2.22 && \
./configure \
--enable-static \
--disable-shared \
--disable-crypto-dl \
--disable-apps-crypto-dl \
--enable-static-linking \
--without-gnu-ld \
--with-default-crypto=openssl \
--with-openssl=/usr/local/ssl \
--with-libxml=/usr/local \
--without-nss \
--without-nspr \
--without-gcrypt \
--without-gnutls \
--without-libxslt && \
make -C src install && \
make -C include install && \
make install-pkgconfigDATA
WORKDIR /go/src/github.com/markwallsgrove/saml_federation_proxy/export_worker
RUN go-wrapper download -u github.com/golang/dep/cmd/dep \
&& go-wrapper install github.com/golang/dep/cmd/dep
COPY export_worker/Gopkg.lock export_worker/Gopkg.toml ./
COPY export_worker/vendor ./vendor
RUN ls; dep ensure --vendor-only -v
WORKDIR /go/src/github.com/markwallsgrove/saml_federation_proxy
COPY . .
WORKDIR export_worker
RUN go build -tags static -ldflags '-s -extldflags "-static"' -o /bin/export_worker main.go
# RUN CGO_ENABLED=0 go build -tags static -ldflags '-s -extldflags "-static"' -o /bin/export_worker main.go
FROM scratch
COPY export_worker/saml.pem /saml.pem
COPY export_worker/saml.crt /saml.crt
COPY --from=build-env /bin/export_worker /bin/
CMD ["/bin/export_worker"]