-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile.test
30 lines (25 loc) · 955 Bytes
/
Dockerfile.test
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
FROM ubuntu:22.04 AS hub-test
RUN apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
build-essential ca-certificates curl git make patch sudo \
&& apt-get clean \
&& curl --proto "=https" -sSL https://get.docker.com/ | sh
WORKDIR /
# apt: ca-certificates git make sudo
RUN git clone https://github.com/udhos/update-golang.git \
&& cd update-golang \
&& sudo RELEASE=1.22.7 ./update-golang.sh \
&& ln -s /usr/local/go/bin/go /usr/bin/go
WORKDIR $GOPATH/src/github.com/plgd-dev/hub
COPY go.mod go.sum ./
RUN go mod download
COPY . .
WORKDIR $GOPATH/src/github.com/plgd-dev/hub/tools/cert-tool
RUN go build -o /usr/bin/cert-tool
WORKDIR /usr/local/go
# apt: patch
RUN ( patch -p1 < "$GOPATH/src/github.com/plgd-dev/hub/tools/docker/patches/shrink_tls_conn.patch" )
WORKDIR $GOPATH/src/github.com/plgd-dev/hub
# RUN go mod tidy
# apt: build-essential
# RUN go test ./... || true