-
Notifications
You must be signed in to change notification settings - Fork 365
Add Docker support #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
neromaverick
wants to merge
1
commit into
snesrev:master
Choose a base branch
from
neromaverick:feature/docker-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Docker support #186
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM ubuntu:20.04 as build | ||
ENV TZ=Etc/UTC | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
# Install dependencies | ||
## apt install python & libraries | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
python3 \ | ||
python3-pip \ | ||
libjpeg-dev \ | ||
zlib1g-dev \ | ||
libsdl2-dev \ | ||
git \ | ||
wget | ||
|
||
## install python dependencies | ||
COPY requirements.txt /tmp/ | ||
RUN pip3 install -r /tmp/requirements.txt | ||
|
||
## Windows build dependencies | ||
#RUN apt-get install -y \ | ||
# binutils-mingw-w64 | ||
#RUN apt-get install -y \ | ||
# tcc \ | ||
# unzip | ||
|
||
## Switch build dependencies | ||
### Install devkitpro for switch build | ||
#RUN wget https://apt.devkitpro.org/install-devkitpro-pacman && \ | ||
# chmod +x ./install-devkitpro-pacman && \ | ||
# sed -i 's/apt-get/apt-get -y /g' ./install-devkitpro-pacman && \ | ||
# ./install-devkitpro-pacman | ||
### Install switch development tools | ||
#RUN ln -s /proc/self/mounts /etc/mtab | ||
#RUN dkp-pacman --noconfirm -S switch-dev switch-sdl2 switch-tools | ||
|
||
RUN mkdir /zelda3 | ||
WORKDIR /zelda3 | ||
|
||
CMD echo 'usage: docker run --rm --mount type=bind,source="$(pwd)",destination=/zelda3 zelda3 make' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not break out to separate
Dockerfile
s per target?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not a bad idea. My original thought was to specify targets using arguments. But different Dockerfiles per target would be clearer and split out the process to be maintained separately.
When I have some free cycles, I'll redo this PR. Unless someone else beats me to it 😉😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a docker expert, but I think duplicating information into multiple Dockerfiles is not very DRY.
Is there a way to have a common dockerfile for the others to reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to keep it in one Dockerfile, that way you can call both jobs, reusing code and decreasing build time.