blob: 4ca65e4ff7acc2861b29740262a8d14cf0231fd6 [file] [log] [blame]
# Copyright 2018 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.
FROM golang:1.13 AS build
LABEL maintainer ""
RUN mkdir /gocache
ENV GOCACHE /gocache
COPY go.mod /go/src/
COPY go.sum /go/src/
# Optimization for iterative docker build speed, not necessary for correctness:
# TODO: write a tool to make writing Go module-friendly Dockerfiles easier.
RUN go install
RUN go install
RUN go install
RUN go install
COPY . /go/src/
# Install binary to /go/bin:
WORKDIR /go/src/
RUN go install -tags "netgo"
FROM debian:stretch
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates netbase \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /go/bin/h2demo /h2demo