Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adagio/swiftsdl2
Dockerfile for Swift + SDL2 (Simple DirectMedia Layer)
https://github.com/adagio/swiftsdl2
directmedia docker dockerfile linux sdl sdl2 swift
Last synced: 2 days ago
JSON representation
Dockerfile for Swift + SDL2 (Simple DirectMedia Layer)
- Host: GitHub
- URL: https://github.com/adagio/swiftsdl2
- Owner: adagio
- Created: 2018-11-29T04:11:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-29T17:36:43.000Z (about 6 years ago)
- Last Synced: 2024-11-07T09:10:16.721Z (about 2 months ago)
- Topics: directmedia, docker, dockerfile, linux, sdl, sdl2, swift
- Language: Dockerfile
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Container for the Apple's Swift programming language, includes sdl2
## SDL2
[Simple DirectMedia Layer](https://www.libsdl.org/download-2.0.php)
## Using this docker image
### Build with Swift within container
Run inside your project
docker run --rm -v $(pwd):/data adagio/swiftsdl2:4.2
The `-v $(pwd):/data` parameter maps the current directory to the `/data` volume
### Run the executable produced
.build/x86_64-unknown-linux/debug/
Yes, you can run the product in host 👌
## Recommendations
Create a `.build` folder inside your project
mkdir .build
Give useful permissions to your `.build` folder
chmod u+s .build
## About parameters in Dockerfile
WORKDIR /data
VOLUME /data
CMD sh -c "swift build -Xswiftc -static-stdlib"The coomand will be executed on `/data` directory, that maps to `/data` volume.
Remember that current directory on the host was mapped to `/data` volume with a parameter on `docker run` command.