mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-10 19:13:42 +00:00
Docker Build Change Proposal (#2373)
* removing due to deprecation * addressing docker build console issues, updating to latest LTS ubuntu, addressing Ubuntu + Python .venv requirements, standardizing environment * Update Dockerfile * proposed docker build changes * improving parallel build * removing * keep image open after build * updating based on feedback * update * fixed typo * revert --------- Co-authored-by: BuildTools <unconfigured@null.spigotmc.org> Co-authored-by: Parker <parker@runforyour.money>
This commit is contained in:
parent
81f89b52c9
commit
15ed658547
3 changed files with 13 additions and 18 deletions
|
@ -25,5 +25,4 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
|
||||||
WORKDIR /oot
|
WORKDIR /oot
|
||||||
RUN git config --global --add safe.directory /oot
|
RUN git config --global --add safe.directory /oot
|
||||||
|
|
||||||
CMD ["/bin/sh", "-c", \
|
CMD make -j $(nproc) setup && make -j $(nproc) && tail -f /dev/null
|
||||||
"echo 'usage:\n docker run --rm --mount type=bind,source=\"$(pwd)\",destination=/oot oot make -j$(nproc) setup\n docker run --rm --mount type=bind,source=\"$(pwd)\",destination=/oot oot make -j$(nproc)'"]
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
services:
|
services:
|
||||||
oot:
|
oot:
|
||||||
|
build:
|
||||||
|
dockerfile: Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- oot-sync:/oot:nocopy
|
- ./:/oot
|
||||||
image: "oot:latest"
|
|
||||||
tty: true
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
volumes:
|
|
||||||
oot-sync:
|
|
||||||
external: true
|
|
||||||
|
|
|
@ -6,22 +6,20 @@ To use Docker, you'll need either Docker Desktop or Docker Toolbox installed and
|
||||||
|
|
||||||
You'll also need to prepare a local version of the project with a copied base ROM (see steps [2](../README.md#2-clone-the-repository) and [3](../README.md#3-prepare-a-base-rom) of the Linux instructions).
|
You'll also need to prepare a local version of the project with a copied base ROM (see steps [2](../README.md#2-clone-the-repository) and [3](../README.md#3-prepare-a-base-rom) of the Linux instructions).
|
||||||
|
|
||||||
## 2. Create the Docker image
|
## 2. Create and start the Docker image build
|
||||||
|
|
||||||
From inside your local project, run the following command:
|
From the root of your local project, run the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build . -t oot
|
docker-compose up --build
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3. Start the container
|
This should immediately begin steps [4](../README.md#4-setup-the-rom-and-build-process) and [5](../README.md#5-build-the-rom) within the Docker container.
|
||||||
|
|
||||||
To start the container, you can mount your local filesystem into the Docker container and run an interactive bash session.
|
## 3. Shell into the 'oot' container
|
||||||
|
|
||||||
|
To exec into the oot Docker image at any time, run the following command either during or after the build:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm --mount type=bind,source="$(pwd)",destination=/oot oot /bin/bash
|
docker-compose exec oot bash
|
||||||
```
|
```
|
||||||
|
|
||||||
## 4. Setup and Build the ROM
|
|
||||||
|
|
||||||
Once inside the container, you can follow steps [4](../README.md#4-setup-the-rom-and-build-process) and [5](../README.md#5-build-the-rom) of the Linux instructions to setup and build the ROM, or run any other command you need.
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue