switch to boringtun
Some checks are pending
continuous-integration/drone/push Build encountered an error
Some checks are pending
continuous-integration/drone/push Build encountered an error
This commit is contained in:
27
Dockerfile
27
Dockerfile
@@ -1,11 +1,13 @@
|
||||
FROM rust:1.32-slim AS eventbuild
|
||||
FROM rust:1.33-slim AS rustbuild
|
||||
|
||||
FROM rustbuild AS eventbuild
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY wg-event-gen/Cargo.* /build/
|
||||
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
COPY wg-event-gen/Cargo.* /build/
|
||||
|
||||
RUN mkdir -p src && echo "fn main() {}" > src/main.rs && cargo build --release --target x86_64-unknown-linux-musl
|
||||
|
||||
COPY wg-event-gen/ /build
|
||||
@@ -18,15 +20,20 @@ COPY --from=eventbuild /build/target/x86_64-unknown-linux-musl/debug/wg-event-ge
|
||||
|
||||
RUN echo "d41d8cd98f00b204e9800998ecf8427e -" > test.md5 && wg-event-gen | md5sum -c test.md5
|
||||
|
||||
FROM golang AS build
|
||||
FROM rustbuild AS boringbuild
|
||||
|
||||
COPY wireguard-go /go/src/wireguard
|
||||
WORKDIR /build
|
||||
|
||||
WORKDIR /go/src/wireguard
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
RUN echo "package main" > ./donotuseon_linux.go && go get
|
||||
COPY boringtun/Cargo.* /build/
|
||||
|
||||
RUN mkdir -p src && echo "fn main() {}" > src/main.rs && touch src/lib.rs && cargo build --release #--target x86_64-unknown-linux-musl #Ring won't compile https://github.com/briansmith/ring/issues/713
|
||||
|
||||
COPY boringtun/ /build
|
||||
|
||||
RUN cargo build --release #--target x86_64-unknown-linux-musl
|
||||
|
||||
RUN go build
|
||||
|
||||
FROM frolvlad/alpine-glibc
|
||||
|
||||
@@ -34,10 +41,10 @@ RUN echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
|
||||
|
||||
ENV WG_I_PREFER_BUGGY_USERSPACE_TO_POLISHED_KMOD=1
|
||||
|
||||
COPY --from=build /go/bin/wireguard /usr/bin/wireguard-go
|
||||
|
||||
COPY --from=eventbuild /build/target/x86_64-unknown-linux-musl/debug/wg-event-gen /usr/bin/
|
||||
|
||||
COPY --from=boringbuild /build/target/release/boringtun /usr/bin/
|
||||
|
||||
COPY init.sh /init.sh
|
||||
|
||||
RUN chmod +x /init.sh && echo 'alias nload="nload ${WG_INTERFACE:-wg0}"' >> /root/.bashrc
|
||||
|
Reference in New Issue
Block a user