Browse Source

build: rust compile of toJSON

dev
Dnomd343 2 years ago
parent
commit
1ce8303a34
  1. 11
      Dockerfile

11
Dockerfile

@ -1,4 +1,5 @@
ARG ALPINE="alpine:3.16"
ARG RUST="rust:1.64-alpine3.16"
ARG GOLANG="golang:1.18-alpine3.16"
FROM ${ALPINE} AS upx
@ -37,10 +38,10 @@ RUN env CGO_ENABLED=0 go build -v -trimpath -ldflags "-X main.VersionString=${DN
COPY --from=upx /tmp/upx /usr/bin/
RUN upx -9 /tmp/dnsproxy
FROM ${GOLANG} AS toJSON
COPY ./toJSON/ /toJSON/
WORKDIR /toJSON/
RUN env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w" && mv toJSON /tmp/
FROM ${RUST} AS to-json
COPY ./to-json/ /to-json/
WORKDIR /to-json/
RUN cargo build --release && mv ./target/release/to-json /tmp/toJSON
COPY --from=upx /tmp/upx /usr/bin/
RUN upx -9 /tmp/toJSON
@ -62,7 +63,7 @@ COPY --from=adguard /tmp/AdGuardHome /release/usr/bin/
COPY --from=overture /tmp/overture /release/usr/bin/
COPY --from=dnsproxy /tmp/dnsproxy /release/usr/bin/
COPY --from=cleardns /tmp/cleardns /release/usr/bin/
COPY --from=toJSON /tmp/toJSON /release/usr/bin/
COPY --from=to-json /tmp/toJSON /release/usr/bin/
FROM ${ALPINE}
COPY --from=build /release/ /

Loading…
Cancel
Save