mirror of
https://github.com/cecio/USBvalve.git
synced 2025-12-06 03:41:45 +00:00
bump to release 0.20.0
This commit is contained in:
39
Dockerfile.pico2
Normal file
39
Dockerfile.pico2
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# To Build:
|
||||
# docker build -t usbvalve-pico2/arduino-cli -f Dockerfile.pico2 .
|
||||
#
|
||||
# To Run:
|
||||
# docker run --rm --name usbvalve -v $PWD:/mnt usbvalve-pico2/arduino-cli /mnt/USBvalve
|
||||
#
|
||||
|
||||
FROM ubuntu:22.04
|
||||
WORKDIR /app
|
||||
|
||||
# OS setup
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y git wget python3 \
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# arduino-cli setup
|
||||
RUN cd /app \
|
||||
&& git clone --recursive https://github.com/arduino/arduino-cli.git \
|
||||
&& cd arduino-cli \
|
||||
&& ./install.sh \
|
||||
&& export PATH=$PATH:/app/arduino-cli/bin \
|
||||
&& arduino-cli --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json core search 2040 \
|
||||
&& arduino-cli --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json core install rp2040:rp2040@4.4.0 \
|
||||
&& arduino-cli lib install "Adafruit TinyUSB Library@3.4.2" \
|
||||
&& arduino-cli lib install "Adafruit SSD1306@2.5.13" \
|
||||
&& arduino-cli lib install "Pico PIO USB@0.6.1" \
|
||||
&& arduino-cli lib install "XxHash_arduino@2.1.0" \
|
||||
&& arduino-cli lib install "GFX Library for Arduino@1.5.0"
|
||||
|
||||
# Compilation setup
|
||||
RUN echo "#!/bin/bash" > /app/entrypoint.sh \
|
||||
&& echo "export PATH=\$PATH:/app/arduino-cli/bin" >> /app/entrypoint.sh \
|
||||
&& echo "arduino-cli compile --fqbn rp2040:rp2040:rpipico2 --build-property \"build.extra_flags=-DCFG_TUD_CDC=1\" --board-options \"usbstack=tinyusb\" --board-options \"freq=120\" --output-dir \"/mnt/USBvalve_out\" \"\$1\"" >> /app/entrypoint.sh \
|
||||
&& chmod +x /app/entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user