2020-10-25 10:03:34 -03:00
|
|
|
FROM golang:alpine AS build
|
|
|
|
|
|
|
|
WORKDIR /app/
|
|
|
|
|
2024-10-29 19:42:29 -03:00
|
|
|
RUN apk add --no-cache build-base libwebp-dev git
|
2022-06-02 22:33:51 -04:00
|
|
|
|
2024-10-29 19:42:29 -03:00
|
|
|
COPY .git .git
|
2020-10-25 10:03:34 -03:00
|
|
|
COPY . .
|
|
|
|
|
2022-03-04 16:31:27 -03:00
|
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
2024-10-29 19:34:26 -03:00
|
|
|
go build -ldflags "-s -w -X 'main.version=$(date '+%Y-%m-%d')-$(git rev-list --abbrev-commit -1 HEAD)'"
|
2020-10-25 10:03:34 -03:00
|
|
|
|
|
|
|
FROM alpine:edge
|
|
|
|
|
2022-06-02 22:33:51 -04:00
|
|
|
RUN apk add --no-cache libwebp
|
|
|
|
|
2020-10-25 10:03:34 -03:00
|
|
|
WORKDIR /app/
|
|
|
|
|
2024-10-29 15:01:35 -03:00
|
|
|
COPY --from=build /app/http3-ytproxy /app/http3-ytproxy
|
2020-10-25 10:03:34 -03:00
|
|
|
|
2024-10-08 23:14:29 -03:00
|
|
|
CMD ./http3-ytproxy -l 0.0.0.0
|