Skip to content

Instantly share code, notes, and snippets.

@eswai
Created Dec 18, 2021
Embed
What would you like to do?
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