Skip to content

Commit cc38c5f

Browse files
authored
Merge pull request #390 from ampproject/master
Merge master into release
2 parents 11c1e4c + c058a00 commit cc38c5f

File tree

5 files changed

+46
-4
lines changed

5 files changed

+46
-4
lines changed

docker/Dockerfile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,34 @@
1313
# limitations under the License.
1414

1515
# Use an official Go runtime as a parent image
16-
FROM golang:1.11
16+
FROM golang:1.13
17+
18+
ENV GO111MODULE=on
1719

1820
# 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
1923
RUN go get -v github.com/ampproject/amppackager/cmd/amppkg
2024

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+
2135
# Seed the ocsp cache
22-
WORKDIR /go/src/github.com/ampproject/amppackager/testdata/b3/
36+
WORKDIR /data/amppackager/testdata/b3
2337
RUN ./seedcache.sh
2438

2539
WORKDIR /go/src/app
40+
2641
# Copy the AMP packager binary into our app dir inside the container.
2742
RUN cp /go/bin/amppkg .
43+
2844
# Copy example config file into container.
2945
COPY amppkg.example.toml .
3046

docker/amppkg.example.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# See https://github.com/ampproject/amppackager/blob/master/amppkg.example.toml
44
# for more information and details on other possible config options.
55

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'
88
OCSPCache = '/tmp/amppkg-ocsp'
99

1010
[[URLSet]]

testdata/b3/ca.ocsp.cert

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIDUTCCAjmgAwIBAgIJALoE1bsaMrFKMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV
3+
BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRMwEQYDVQQKDApHb29nbGUgTExD
4+
MRkwFwYDVQQDDBBvY3NwLmV4YW1wbGUuY29tMB4XDTE4MTEwNTE5MzIxMloXDTE4
5+
MTIwNTE5MzIxMlowUjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
6+
EzARBgNVBAoMCkdvb2dsZSBMTEMxGTAXBgNVBAMMEG9jc3AuZXhhbXBsZS5jb20w
7+
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC52bjEZwQIt5pIZY712P6n
8+
bQOoRGKmalU6SksHjhVx8x9358Fjs+z1S1xm+HwU8LDj82wapj2/GZbLgk6wiYeS
9+
F17a4cKbdOfZUqQiQpQfciABS3sd2ZG0YghR/VdTHa3mH56lX90Z/3pq0KlwIDk1
10+
U/PpKYaWwC1Ywpj1COEJ9OmdTjcoPQ1nEc1vKdlyjlAvDYqKptrK2grGykvu0Rh2
11+
ZeJ99YSSYknh6zx6U3FWtKlmPgMjSWO2gtpbMLPI3Uehde0b3Bq8JntjPvbh8gLo
12+
GaOEsvvDgTfFRpRkNqMAjLVfz/zol9CpBdggg4Fyj9J0CGjM9f1ZBhXLmtoxkAQj
13+
AgMBAAGjKjAoMA4GA1UdDwEB/wQEAwIHgDAWBgNVHSUBAf8EDDAKBggrBgEFBQcD
14+
CTANBgkqhkiG9w0BAQsFAAOCAQEAStm0n/tspDf5ooVy8VoQslMdeMpBDe7VPhzp
15+
Fl9HvTKtxxSohtt7BhGN7HzSgW5bAqeGUxiQ7aiizv5NJv348j+aI/+cX/nOo+VG
16+
n60NAkkmKA8MW1e04kLWr3JL+qTejv9HXM3aeik80lyjqOKd5ZGxHFsdObto7I+U
17+
Y6EC3r300/sVSgluYrSr3qpS2OwdY0D/8mfp7H3gXQQfNT3d0tSq4lBCGQfz8Gwe
18+
tpEaPQWptq0nO5U5tZqMNmZluHcUxaMMd99kCgDCDQkSQO3TSqEP4guO73h8TYoM
19+
fIV5BaJd560e1noyYxpFuiN35bUC3m49i5WcG7ZxZodoYclYRA==
20+
-----END CERTIFICATE-----

testdata/b3/index.txt

Whitespace-only changes.

testdata/b3/seedcache.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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

0 commit comments

Comments
 (0)