mirror of
https://github.com/FranP-code/TurboRun.git
synced 2025-10-13 00:14:01 +00:00
added windows build docker
This commit is contained in:
31
Dockerfile
31
Dockerfile
@@ -1,31 +0,0 @@
|
|||||||
# FROM alpine:latest
|
|
||||||
|
|
||||||
# RUN apk update
|
|
||||||
# RUN apk upgrade
|
|
||||||
# RUN apk add curl file git
|
|
||||||
# RUN apk add gcc
|
|
||||||
# RUN apk add rust-doc
|
|
||||||
# # RUN apk search rust-std
|
|
||||||
# # RUN apk add rust-std
|
|
||||||
|
|
||||||
# RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -y | sh
|
|
||||||
# # RUN source $HOME/.cargo/env
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# CMD [""]
|
|
||||||
|
|
||||||
FROM rust:latest
|
|
||||||
|
|
||||||
RUN apt upgrade
|
|
||||||
RUN apt update
|
|
||||||
# RUN apt install -y \
|
|
||||||
# clang \
|
|
||||||
# gcc \
|
|
||||||
# g++ \
|
|
||||||
# zlib1g-dev \
|
|
||||||
# libmpc-dev \
|
|
||||||
# libmpfr-dev \
|
|
||||||
# libgmp-dev
|
|
||||||
|
|
||||||
CMD [""]
|
|
||||||
10
build.sh
10
build.sh
@@ -1,10 +0,0 @@
|
|||||||
if [ "$1" = "macos-arm" ]; then
|
|
||||||
rustup target add aarch64-apple-darwin
|
|
||||||
cargo build --release --target=aarch64-apple-darwin
|
|
||||||
elif [ "$1" = "linux" ]; then
|
|
||||||
rustup target add x86_64-unknown-linux-musl
|
|
||||||
cargo build --release --target=x86_64-unknown-linux-musl
|
|
||||||
elif [ "$1" = "windows" ]; then
|
|
||||||
rustup target add x86_64-pc-windows-msvc
|
|
||||||
cargo build --release --target=x86_64-pc-windows-msvc
|
|
||||||
fi
|
|
||||||
13
build/build.sh
Normal file
13
build/build.sh
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
if [ "$1" = "macos-arm" ]; then
|
||||||
|
rustup target add aarch64-apple-darwin
|
||||||
|
cargo build --release --target=aarch64-apple-darwin
|
||||||
|
elif [ "$1" = "linux" ]; then
|
||||||
|
cd /usr/src
|
||||||
|
rustup target add x86_64-unknown-linux-gnu
|
||||||
|
cargo build --release --target=x86_64-unknown-linux-gnu
|
||||||
|
elif [ "$1" = "windows" ]; then
|
||||||
|
cd /usr/src
|
||||||
|
rustup target add x86_64-pc-windows-gnu
|
||||||
|
rustup toolchain install stable-x86_64-pc-windows-gnu
|
||||||
|
cargo build --release --target=x86_64-pc-windows-gnu
|
||||||
|
fi
|
||||||
8
build/windows_build.Dockerfile
Normal file
8
build/windows_build.Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
FROM rust:latest
|
||||||
|
|
||||||
|
RUN apt update && apt upgrade -y
|
||||||
|
RUN apt install -y g++-mingw-w64-x86-64
|
||||||
|
|
||||||
|
WORKDIR /usr/src
|
||||||
|
|
||||||
|
CMD ["sh", "./build/build.sh", "windows"]
|
||||||
9
build/windows_build.docker-compose.yml
Normal file
9
build/windows_build.docker-compose.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
version: "2.9"
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
dockerfile: ./windows_build.Dockerfile
|
||||||
|
volumes:
|
||||||
|
- ../:/usr/src
|
||||||
|
- /usr/src/Project
|
||||||
1
main.rs
1
main.rs
@@ -45,6 +45,7 @@ fn main() {
|
|||||||
project_type = args.project_type.as_ref().unwrap().to_string();
|
project_type = args.project_type.as_ref().unwrap().to_string();
|
||||||
} else {
|
} else {
|
||||||
let selection = Select::with_theme(&ColorfulTheme::default())
|
let selection = Select::with_theme(&ColorfulTheme::default())
|
||||||
|
.with_prompt("What type is your project?")
|
||||||
.items(&items)
|
.items(&items)
|
||||||
.default(0)
|
.default(0)
|
||||||
.interact_on_opt(&Term::stderr());
|
.interact_on_opt(&Term::stderr());
|
||||||
|
|||||||
Reference in New Issue
Block a user