File tree Expand file tree Collapse file tree 5 files changed +46
-4
lines changed Expand file tree Collapse file tree 5 files changed +46
-4
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
# Use an official Go runtime as a parent image
16
- FROM golang:1.11
16
+ FROM golang:1.13
17
+
18
+ ENV GO111MODULE=on
17
19
18
20
# Install AMP Packager
21
+ # Run this if you want to go off master branch.
22
+ # RUN go get -v github.com/ampproject/amppackager/cmd/amppkg@master
19
23
RUN go get -v github.com/ampproject/amppackager/cmd/amppkg
20
24
25
+ # Install git
26
+ RUN apt-get update \
27
+ && apt-get install -y git
28
+
29
+ # Clone amppackager files so we can use b3 directory
30
+ WORKDIR /data
31
+ # Run this if you clone from master branch.
32
+ # RUN git clone -b master https://github.com/ampproject/amppackager.git /data/amppackager
33
+ RUN git clone https://github.com/ampproject/amppackager.git /data/amppackager
34
+
21
35
# Seed the ocsp cache
22
- WORKDIR /go/src/github.com/ampproject/ amppackager/testdata/b3/
36
+ WORKDIR /data/ amppackager/testdata/b3
23
37
RUN ./seedcache.sh
24
38
25
39
WORKDIR /go/src/app
40
+
26
41
# Copy the AMP packager binary into our app dir inside the container.
27
42
RUN cp /go/bin/amppkg .
43
+
28
44
# Copy example config file into container.
29
45
COPY amppkg.example.toml .
30
46
Original file line number Diff line number Diff line change 3
3
# See https://github.com/ampproject/amppackager/blob/master/amppkg.example.toml
4
4
# for more information and details on other possible config options.
5
5
6
- CertFile = ' /go/src/github.com/ampproject /amppackager/testdata/b3/fullchain.cert'
7
- KeyFile = ' /go/src/github.com/ampproject /amppackager/testdata/b3/server.privkey'
6
+ CertFile = ' /data /amppackager/testdata/b3/fullchain.cert'
7
+ KeyFile = ' /data /amppackager/testdata/b3/server.privkey'
8
8
OCSPCache = ' /tmp/amppkg-ocsp'
9
9
10
10
[[URLSet ]]
Original file line number Diff line number Diff line change
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDUTCCAjmgAwIBAgIJALoE1bsaMrFKMA0GCSqGSIb3DQ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QWptq0nO5U5tZqMNmZluHcUxaMMd99kCgDCDQkSQO3TSqEP4guO73h8TYoM
19
+ fIV5BaJd560e1noyYxpFuiN35bUC3m49i5WcG7ZxZodoYclYRA==
20
+ -----END CERTIFICATE-----
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Seed the OCSP cache using the fake test certs. Do NOT run this if you
4
+ # are using real certificates with the AMP Packager.
5
+
6
+ openssl ocsp -index ./index.txt -rsigner ca.ocsp.cert -rkey ca.privkey -CA ca.cert -ndays 7 -issuer ca.cert -cert server.cert -respout /tmp/amppkg-ocsp
You can’t perform that action at this time.
0 commit comments