e2e/docker: add Dockerfile.frontend
The contents of this file was empty when added in CL 326649.
Trust: Julie Qiu
Run-TryBot: Julie Qiu
+# Copyright 2021 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# This Dockerfile expects the build context to be the public repo root.
+
+################################################################
+FROM golang:1.15.5 AS builder
+# If you change the Go version above, change the FROM line below as well.
+
+# Set the working directory outside $GOPATH to ensure module mode is enabled.
+WORKDIR /src
+
+# Copy go.mod and go.sum into the container.
+# If they don't change, which is the common case, then docker can
+# cache this COPY and the subsequent RUN.
+COPY go.mod go.sum all.bash /
+
+# Download the dependencies.
+RUN go mod download
+
+# Build the frontend.
+RUN go build -mod=readonly ./cmd/frontend
+
+################################################################
+FROM golang:1.15.5
+
+WORKDIR app
+
+COPY --from=builder src/frontend frontend
+COPY content/static content/static
+COPY third_party third_party
