github.com/anacrolix/torrent@v1.61.0/Dockerfile (about)

     1  # On macOS, docker does not support IPv6.
     2  
     3  FROM alpine
     4  
     5  RUN apk add go fuse bash rustup git gcc musl-dev g++ just
     6  RUN rustup-init -y --profile minimal
     7  ENV PATH="/root/.cargo/bin:$PATH"
     8  
     9  WORKDIR /src
    10  
    11  ENV GOWORK=off
    12  
    13  COPY . .
    14  
    15  RUN git submodule update --init --recursive
    16  
    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 \
    20  	just build-possum
    21  
    22  ARG GOCACHE=/root/.cache/go-build
    23  ARG GOMODCACHE=/root/go/pkg/mod
    24  
    25  RUN --mount=type=cache,target=$GOCACHE \
    26  	--mount=type=cache,target=$GOMODCACHE \
    27  	just test
    28  
    29  # # Can't use fuse inside Docker? Asks for modprobe fuse.
    30  
    31  # RUN go install github.com/anacrolix/godo@v1
    32  # RUN echo "$HOME"
    33  # ENV PATH="/root/go/bin:$PATH"
    34  # # RUN --mount=type=cache,target=$GOCACHE \
    35  # # 	--mount=type=cache,target=$GOMODCACHE \
    36  # # 	./fs/test.sh