-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM docker:20.10-dind | ||
|
||
RUN apk add curl bash libgcc gcc musl-dev git | ||
|
||
RUN curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
# need to ensure cargo is in the path when we run this command, | ||
# since we won't be sourcing the profile. | ||
RUN PATH="$HOME/.cargo/bin:$PATH" cargo install cross --git https://github.com/cross-rs/cross --locked | ||
|
||
COPY cross-entry.sh / | ||
ENTRYPOINT ["/cross-entry.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# shellcheck disable=SC1090 | ||
. ~/.cargo/env | ||
export CROSS_CONTAINER_IN_CONTAINER=1 | ||
|
||
exec "${@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
main() { | ||
apk add gcc curl musl-dev | ||
|
||
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
PATH="$HOME/.cargo/bin:$PATH" cargo install cross --git https://github.com/cross-rs/cross --locked | ||
|
||
apk del gcc curl musl-dev | ||
|
||
rm -rf "${0}" | ||
} | ||
|
||
main "${@}" |