wip: rust/go pallets
This commit is contained in:
parent
724faaeeb3
commit
e2adff2416
2 changed files with 36 additions and 0 deletions
20
pallets/go/Containerfile
Normal file
20
pallets/go/Containerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
FROM stagex/filesystem
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/go . /
|
||||
|
||||
ENV GOPATH=/home/user/go
|
||||
ENV GOCACHE=/home/user/go/cache/
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GOSUMDB=sum.golang.org
|
||||
ENV GOWORK=off
|
||||
ENV GOHOSTOS=linux
|
||||
ENV GOHOSTARCH=amd64
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GO_LDFLAGS="-s -w -buildid= -extldflags=-static"
|
||||
ENV GO_BUILDFLAGS="-x -v -trimpath -buildvcs=false"
|
||||
ENV GOFLAGS=${GO_BUILDFLAGS} -ldflags="${GO_LDFLAGS}"
|
||||
|
||||
ENTRYPOINT ["/usr/bin/go"]
|
||||
CMD ["version"]
|
16
pallets/rust/Containerfile
Normal file
16
pallets/rust/Containerfile
Normal file
|
@ -0,0 +1,16 @@
|
|||
FROM stagex/filesystem
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/llvm . /
|
||||
COPY --from=stagex/libunwind . /
|
||||
COPY --from=stagex/zlib . /
|
||||
COPY --from=stagex/rust . /
|
||||
|
||||
ENV RUSTFLAGS='-C target-feature=+crt-static'
|
||||
ENV CARGOFLAGS='--target x86_64-unknown-linux-musl --no-default-features --locked --release'
|
||||
ENV CARGO_HOME=/home/user/cargo
|
||||
|
||||
ENTRYPOINT ["/usr/bin/rustc"]
|
||||
CMD ["--version"]
|
Loading…
Reference in a new issue