docker: Simplify the Dockerfile a little

We can pass arguments to the entrypoint from the `docker run` commandline, so we
do not need to do that via an environment variable. This way, we're an
environment variable and an `eval` shorter.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/903/head
Gergely Nagy 4 years ago
parent 49064d679e
commit 0f7ff140fc
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -16,5 +16,4 @@ docker build -t kaleidoscope/docker etc
docker run --rm -it \ docker run --rm -it \
-v "${BOARD_HARDWARE_PATH}/keyboardio:/kaleidoscope/hardware/keyboardio" \ -v "${BOARD_HARDWARE_PATH}/keyboardio:/kaleidoscope/hardware/keyboardio" \
-v "$(pwd):/kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope" \ -v "$(pwd):/kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope" \
-e DOCKER_COMMAND="$*" \ kaleidoscope/docker -c "$*"
kaleidoscope/docker

@ -17,4 +17,4 @@ RUN /usr/local/bin/arduino-cli core install arduino:avr
VOLUME ["/kaleidoscope/hardware/keyboardio"] VOLUME ["/kaleidoscope/hardware/keyboardio"]
ENV BOARD_HARDWARE_PATH "/kaleidoscope/hardware" ENV BOARD_HARDWARE_PATH "/kaleidoscope/hardware"
WORKDIR /kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope WORKDIR /kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope
ENTRYPOINT ["/bin/bash", "-c", "eval \"${DOCKER_COMMAND}\""] ENTRYPOINT ["/bin/bash"]

Loading…
Cancel
Save