Skip to content

Instantly share code, notes, and snippets.

@eswai
Created December 18, 2021 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eswai/bc9ca3e1c9c1f3a27dcf490d68556869 to your computer and use it in GitHub Desktop.
Save eswai/bc9ca3e1c9c1f3a27dcf490d68556869 to your computer and use it in GitHub Desktop.
Dockerfile for PRK firmware without keymap
FROM ruby:3.0.1-slim AS build
RUN apt-get update && apt-get install --no-install-recommends -y \
cmake \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi \
libstdc++-arm-none-eabi-newlib \
ca-certificates \
git \
gcc \
make \
g++ \
zip \
python3 \
ruby
ENV PRK_HOME /prk_firmware
VOLUME "${PRK_HOME}"
WORKDIR "${PRK_HOME}"
COPY . .
WORKDIR "${PRK_HOME}/src/ruby"
RUN bundle install
WORKDIR "${PRK_HOME}"
RUN git clone https://github.com/raspberrypi/pico-sdk.git
ENV PICO_SDK_PATH "${PRK_HOME}/pico-sdk"
WORKDIR "${PICO_SDK_PATH}"
RUN git submodule update --init
WORKDIR "${PRK_HOME}/lib/picoruby"
RUN make
WORKDIR "${PRK_HOME}"
RUN ./setup.sh
WORKDIR "${PRK_HOME}/build"
RUN make
FROM scratch AS export
ENV PRK_HOME /prk_firmware
COPY --from=build "${PRK_HOME}/build" "./build"
# ex. docker build -o . .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment