1 # On macOS, docker does not support IPv6.
5 RUN apk add go fuse bash rustup git gcc musl-dev g++
6 RUN rustup-init -y --profile minimal
7 ENV PATH="/root/.cargo/bin:$PATH"
12 RUN git clone https://github.com/anacrolix/possum
16 RUN git submodule update --init --recursive
17 RUN --mount=type=cache,target=/root/.cargo/registry \
18 --mount=type=cache,target=/root/.cargo/git \
19 --mount=type=cache,target=/src/possum/target \
24 ARG GOCACHE=/root/.cache/go-build
25 ARG GOMODCACHE=/root/go/pkg/mod
27 RUN --mount=type=cache,target=$GOCACHE \
28 --mount=type=cache,target=$GOMODCACHE \
29 CGO_LDFLAGS=possum/target/debug/libpossum.a \
30 go test -failfast ./...
32 # # Can't use fuse inside Docker? Asks for modprobe fuse.
34 # RUN go install github.com/anacrolix/godo@v1
36 # ENV PATH="/root/go/bin:$PATH"
37 # # RUN --mount=type=cache,target=$GOCACHE \
38 # # --mount=type=cache,target=$GOMODCACHE \