mirror of
https://github.com/Vomitblood/stort.git
synced 2024-11-26 13:55:27 +08:00
27 lines
696 B
Bash
27 lines
696 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
IMAGE_NAME="ubuntu:22.04"
|
||
|
HOST_PROJECT_DIR="$PWD"
|
||
|
CONTAINER_PROJECT_DIR="/app"
|
||
|
HOST_OUTPUT_DIR="$PWD/src-tauri/target/release/bundle/appimage"
|
||
|
CONTAINER_OUTPUT_DIR="$CONTAINER_PROJECT_DIR/src-tauri/target/release/bundle/appimage"
|
||
|
USER_ID=$(id -u)
|
||
|
GROUP_ID=$(id -g)
|
||
|
|
||
|
docker pull $IMAGE_NAME
|
||
|
|
||
|
# run the docker image and remove on completion
|
||
|
docker run --rm -it \
|
||
|
-v "$HOST_PROJECT_DIR":$CONTAINER_PROJECT_DIR \
|
||
|
$IMAGE_NAME \
|
||
|
/bin/bash -c "
|
||
|
|
||
|
# update packages
|
||
|
apt update && apt install curl -y && \
|
||
|
|
||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
|
||
|
echo $HOME && \
|
||
|
source "/root/.cargo/env" && \
|
||
|
cargo --version
|
||
|
"
|