1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-01-13 19:57:18 +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:
ptweezy 2024-12-15 19:12:09 -05:00 committed by GitHub
parent 81f89b52c9
commit 15ed658547
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 18 deletions

View file

@ -25,5 +25,4 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
WORKDIR /oot
RUN git config --global --add safe.directory /oot
CMD ["/bin/sh", "-c", \
"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)'"]
CMD make -j $(nproc) setup && make -j $(nproc) && tail -f /dev/null

View file

@ -1,10 +1,8 @@
services:
oot:
build:
dockerfile: Dockerfile
volumes:
- oot-sync:/oot:nocopy
image: "oot:latest"
- ./:/oot
tty: true
volumes:
oot-sync:
external: true
stdin_open: true

View file

@ -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).
## 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
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
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.