Update Dockerfile to be less painful; Set JABY_ENGINE_PATH automatically
This commit is contained in:
parent
6b1a8c246a
commit
80a49a7e92
|
@ -1,8 +1,16 @@
|
|||
FROM "ubuntu:24.04"
|
||||
ADD ["scripts/install_pop-fe.sh", "scripts/install_rust.sh", "scripts/make_gcc.sh", "scripts/prerequisites.sh", "/usr/scripts"]
|
||||
RUN apt update && cd /usr/scripts && ./prerequisites.sh && ./install_rust.sh && cd /usr && ./scripts/make_gcc.sh
|
||||
WORKDIR /usr
|
||||
ADD ["scripts/make_gcc.sh", "/usr/scripts"]
|
||||
RUN apt update && /usr/scripts/make_gcc.sh
|
||||
|
||||
WORKDIR /usr/scripts
|
||||
ADD ["scripts/install_rust.sh", "/usr/scripts"]
|
||||
RUN apt update && ./install_rust.sh
|
||||
|
||||
# TODO: Deal with this eventually
|
||||
ADD ["scripts/install_pop-fe.sh", "/usr/scripts"]
|
||||
|
||||
#WORKDIR /usr/src/project
|
||||
|
||||
#RUN apt update && apt install -y nginx
|
||||
|
||||
|
@ -13,4 +21,5 @@ RUN apt update && cd /usr/scripts && ./prerequisites.sh && ./install_rust.sh &&
|
|||
|
||||
#ADD install_pop-fe.sh install_pop-fe.sh
|
||||
#CMD ["cp", "install_pop-fe.sh", "/my_vol"]
|
||||
# TODO: Make a script that builds the image and then registers alias like `jaby-make` for the docker command
|
||||
|
||||
# TODO: Make a script that builds the image and --then registers alias like `jaby-make` for the docker command-- Cody said alias are bad (yesterday he liked them) and wants scripts instead (He also suddenly claims that he called them invasive but ACTUALLY it was me. Oh noooow he corrects his statement)
|
|
@ -1 +1,13 @@
|
|||
podman build -t jaby_engine .
|
||||
#!/usr/bin/env bash
|
||||
podman build -t jaby_engine .
|
||||
|
||||
if [[ -z "${JABY_ENGINE_PATH}" ]]; then
|
||||
echo "Setting JABY_ENGINE_PATH to parent folder"
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
|
||||
JABY_ENGINE_PATH="$(dirname "$SCRIPT_DIR")"
|
||||
cat << End >> ~/.profile
|
||||
export JABY_ENGINE_PATH="$JABY_ENGINE_PATH"
|
||||
End
|
||||
source ~/.profile
|
||||
fi
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/bash
|
||||
echo "<<< Install Rust prerequisites >>>"
|
||||
apt install -y curl
|
||||
|
||||
echo "<<< Install Rust >>>"
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
. "$HOME/.cargo/env"
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/bash
|
||||
echo "<<< Install GCC prerequisites >>>"
|
||||
apt install -y make texinfo g++ gcc git libgmp3-dev libmpfr-dev libmpc-dev flex install-info info bison
|
||||
|
||||
GCC_VERSION=13.1.0
|
||||
|
||||
echo "<<< Build GCC >>>"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "<<< Install prerequisites >>>"
|
||||
apt install -y curl make texinfo g++ gcc git libgmp3-dev libmpfr-dev libmpc-dev flex install-info info bison
|
|
@ -23,6 +23,7 @@ JabyEngine is my personal attempt to eventually make my own PS1 game from "groun
|
|||
* `podman run -it <COMMIT ID> /bin/bash`: runs bash and interactive
|
||||
* `podman run --rm <-v <local_folder>:<absolute docker_folder> <-e ENV_VAR=VALUE> jaby_engine`: clean up after run
|
||||
* `podman image tree <TAG/ID>`: lists usefull information
|
||||
* `podman run --rm -it -v ${JABY_ENGINE_PATH}:${JABY_ENGINE_PATH} jaby_engine /bin/bash` maybe a good idea...?
|
||||
|
||||
## How to build
|
||||
JabyEngine relies on linux to be build. For Windows users it uses `wsl` instead but support for it might get dropped during further development.
|
||||
|
|
Loading…
Reference in New Issue