-
Notifications
You must be signed in to change notification settings - Fork 142
/
Dockerfile
38 lines (29 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 2023 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.21-bookworm AS build
LABEL maintainer="golang-dev@googlegroups.com"
COPY go.mod /go/src/golang.org/x/build/go.mod
COPY go.sum /go/src/golang.org/x/build/go.sum
WORKDIR /go/src/golang.org/x/build
# Download module dependencies to improve speed of re-building the
# Docker image during minor code changes.
RUN go mod download
COPY . /go/src/golang.org/x/build/
RUN go install golang.org/x/build/cmd/makemac
FROM debian:bookworm
LABEL maintainer="golang-dev@googlegroups.com"
# netbase and ca-certificates are needed for dialing TLS.
# The rest are useful for debugging if somebody needs to exec into the container.
RUN apt-get update && apt-get install -y \
--no-install-recommends \
netbase \
ca-certificates \
curl \
strace \
procps \
lsof \
psmisc \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /go/bin/makemac /
ENTRYPOINT ["/makemac"]