diff --git a/distro/alpine.dockerfile b/distro/alpine.dockerfile index 32df854..40a1056 100644 --- a/distro/alpine.dockerfile +++ b/distro/alpine.dockerfile @@ -1,7 +1,14 @@ -FROM docker.io/library/golang:1.20.0-alpine as build +# FROM docker.io/library/alpine:3.17.2 as gvisor-tap-vsock +# WORKDIR /app/bin +# RUN wget -O gvproxy-windows.exe https://github.com/containers/gvisor-tap-vsock/releases/download/v0.6.0/gvproxy-windows.exe && \ +# wget -O vm https://github.com/containers/gvisor-tap-vsock/releases/download/v0.6.0/vm && \ +# chmod +x ./gvproxy-windows.exe ./vm +# RUN find . -type f -exec sha256sum {} \; + +FROM docker.io/library/golang:1.20.0-alpine as gvisor-tap-vsock WORKDIR /app RUN apk add git make -RUN git clone https://github.com/containers/gvisor-tap-vsock.git --single-branch /app +RUN git clone https://github.com/sakai135/gvisor-tap-vsock.git --single-branch --branch fix-stdio /app RUN make && make cross RUN find ./bin -type f -exec sha256sum {} \; @@ -12,8 +19,8 @@ RUN apk update && \ apk list --installed && \ rm -rf /var/cache/apk/* WORKDIR /app -COPY --from=build /app/bin/vm ./wsl-vm -COPY --from=build /app/bin/gvproxy-windows.exe ./wsl-gvproxy.exe +COPY --from=gvisor-tap-vsock /app/bin/vm ./wsl-vm +COPY --from=gvisor-tap-vsock /app/bin/gvproxy-windows.exe ./wsl-gvproxy.exe COPY ./wsl-vpnkit ./wsl-vpnkit.service ./ COPY ./distro/wsl.conf /etc/wsl.conf ARG REF=https://example.com/ diff --git a/distro/fedora.dockerfile b/distro/fedora.dockerfile index 4f9fbcc..7fe34db 100644 --- a/distro/fedora.dockerfile +++ b/distro/fedora.dockerfile @@ -1,7 +1,14 @@ -FROM docker.io/library/golang:1.20.0-alpine as build +# FROM docker.io/library/golang:1.20.0-alpine as gvisor-tap-vsock +# WORKDIR /app +# RUN apk add git make +# RUN git clone https://github.com/containers/gvisor-tap-vsock.git --single-branch /app +# RUN make && make cross +# RUN find ./bin -type f -exec sha256sum {} \; + +FROM docker.io/library/golang:1.20.0-alpine as gvisor-tap-vsock WORKDIR /app RUN apk add git make -RUN git clone https://github.com/containers/gvisor-tap-vsock.git --single-branch /app +RUN git clone https://github.com/sakai135/gvisor-tap-vsock.git --single-branch --branch fix-stdio /app RUN make && make cross RUN find ./bin -type f -exec sha256sum {} \; @@ -10,8 +17,8 @@ RUN dnf upgrade -y && \ dnf install -y iproute iptables-legacy iputils bind-utils wget && \ dnf clean all WORKDIR /app -COPY --from=build /app/bin/vm ./wsl-vm -COPY --from=build /app/bin/gvproxy-windows.exe ./wsl-gvproxy.exe +COPY --from=gvisor-tap-vsock /app/bin/vm ./wsl-vm +COPY --from=gvisor-tap-vsock /app/bin/gvproxy-windows.exe ./wsl-gvproxy.exe COPY ./wsl-vpnkit ./wsl-vpnkit.service ./ COPY ./distro/wsl.conf /etc/wsl.conf RUN ln -s /app/wsl-vpnkit /usr/bin/ diff --git a/distro/ubuntu.dockerfile b/distro/ubuntu.dockerfile index 53a8fe1..ace60b6 100644 --- a/distro/ubuntu.dockerfile +++ b/distro/ubuntu.dockerfile @@ -1,7 +1,14 @@ -FROM docker.io/library/golang:1.20.0-alpine as build +# FROM docker.io/library/golang:1.20.0-alpine as gvisor-tap-vsock +# WORKDIR /app +# RUN apk add git make +# RUN git clone https://github.com/containers/gvisor-tap-vsock.git --single-branch /app +# RUN make && make cross +# RUN find ./bin -type f -exec sha256sum {} \; + +FROM docker.io/library/golang:1.20.0-alpine as gvisor-tap-vsock WORKDIR /app RUN apk add git make -RUN git clone https://github.com/containers/gvisor-tap-vsock.git --single-branch /app +RUN git clone https://github.com/sakai135/gvisor-tap-vsock.git --single-branch --branch fix-stdio /app RUN make && make cross RUN find ./bin -type f -exec sha256sum {} \; @@ -11,8 +18,8 @@ RUN apt-get update && \ apt-get install -y iproute2 iptables iputils-ping dnsutils wget && \ apt-get clean WORKDIR /app -COPY --from=build /app/bin/vm ./wsl-vm -COPY --from=build /app/bin/gvproxy-windows.exe ./wsl-gvproxy.exe +COPY --from=gvisor-tap-vsock /app/bin/vm ./wsl-vm +COPY --from=gvisor-tap-vsock /app/bin/gvproxy-windows.exe ./wsl-gvproxy.exe COPY ./wsl-vpnkit ./wsl-vpnkit.service ./ COPY ./distro/wsl.conf /etc/wsl.conf RUN ln -s /app/wsl-vpnkit /usr/bin/