Skip to content

Commit c058a00

Browse files
authored
Address #387. Fix up Dockerfile and example TOML. (#389)
1 parent 45220fd commit c058a00

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-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]]

0 commit comments

Comments
 (0)