diff options
| author | Konstantin Đorđević <vomindoraan@gmail.com> | 2018-12-08 18:42:46 +0100 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2018-12-08 09:42:46 -0800 |
| commit | 13ad6501361faa9433562dba4ea8c55f85bf1dc5 (patch) | |
| tree | c6ac7ff8074cd4bb1f920fa0a204219d76fb8d0a /Dockerfile | |
| parent | 2ad2b73d685cf25268fa7d3726f45594edee70c4 (diff) | |
| download | qmk_firmware-13ad6501361faa9433562dba4ea8c55f85bf1dc5.tar.gz qmk_firmware-13ad6501361faa9433562dba4ea8c55f85bf1dc5.zip | |
Add a better Docker build script + update Dockerfile (#4222)
* Add a Docker build script
* Add usage and error messages
* Add -r to reads
Thanks mechmerlin
* Add keyboard:keymap form, improve script
* Add target argument, change usage forms in script
* Add check for more than 3 args in keyboard:keymap:target form
* Change Docker base image to debian, use community repo
This matches what qmk_compiler uses (https://github.com/qmk/qmk_compiler/blob/master/Dockerfile#L1).
I've removed the maintainer as we now have a community build on Docker Hub (https://hub.docker.com/r/qmkfm/qmk_firmware). This Dockerfile will also be maintained by the community.
* Change build command format to keyboard:keymap
* Call make directly in container run command
* Simplify script, remove 3-arg form
* Add COPY to Dockerfile so images are usable in and of themselves
Also change WORKDIR from /qmk to /qmk_firmware
* Add USB pass-through for Linux and docker-machine hosts
* Read directly into variables instead of array
* Alphabetically sort dependencies in Dockerfile
* Set executable bit on util/docker_build.sh
* Update Docker docs
* Add warning about Docker on Windows
* Expand comment in docs
* Check docker-machine exit code instead of string
* Only match --help with whole arguments
* Make script POSIX-compliant
* Convert script indentation to tabs
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/Dockerfile b/Dockerfile index dfde33b5c..8f78dc2bf 100644 --- a/Dockerfile +++ b/Dockerfile | |||
| @@ -1,28 +1,29 @@ | |||
| 1 | FROM debian:jessie | 1 | FROM debian |
| 2 | MAINTAINER Erik Dasque <erik@frenchguys.com> | ||
| 3 | 2 | ||
| 4 | RUN apt-get update && apt-get install --no-install-recommends -y build-essential \ | 3 | RUN apt-get update && apt-get install --no-install-recommends -y \ |
| 5 | gcc \ | ||
| 6 | unzip \ | ||
| 7 | wget \ | ||
| 8 | zip \ | ||
| 9 | gcc-avr \ | ||
| 10 | binutils-avr \ | ||
| 11 | avr-libc \ | 4 | avr-libc \ |
| 5 | avrdude \ | ||
| 6 | binutils-arm-none-eabi \ | ||
| 7 | binutils-avr \ | ||
| 8 | build-essential \ | ||
| 12 | dfu-programmer \ | 9 | dfu-programmer \ |
| 13 | dfu-util \ | 10 | dfu-util \ |
| 11 | gcc \ | ||
| 14 | gcc-arm-none-eabi \ | 12 | gcc-arm-none-eabi \ |
| 15 | binutils-arm-none-eabi \ | 13 | gcc-avr \ |
| 16 | libnewlib-arm-none-eabi \ | ||
| 17 | git \ | 14 | git \ |
| 15 | libnewlib-arm-none-eabi \ | ||
| 18 | software-properties-common \ | 16 | software-properties-common \ |
| 19 | avrdude \ | 17 | unzip \ |
| 18 | wget \ | ||
| 19 | zip \ | ||
| 20 | && rm -rf /var/lib/apt/lists/* | 20 | && rm -rf /var/lib/apt/lists/* |
| 21 | 21 | ||
| 22 | ENV keyboard=ergodox | 22 | ENV KEYBOARD=ergodox_ez |
| 23 | ENV subproject=ez | 23 | ENV KEYMAP=default |
| 24 | ENV keymap=default | 24 | |
| 25 | VOLUME /qmk_firmware | ||
| 26 | WORKDIR /qmk_firmware | ||
| 27 | COPY . . | ||
| 25 | 28 | ||
| 26 | VOLUME /qmk | 29 | CMD make $KEYBOARD:$KEYMAP |
| 27 | WORKDIR /qmk | ||
| 28 | CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap} | ||
