-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (35 loc) · 1.24 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Start from the latest Swift nightly main toolchain
FROM swiftlang/swift:nightly-main-jammy
# Install the dependencies and the toolchain packages
RUN apt-get update && apt-get install -y \
git \
cmake \
nano \
python3 \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi \
libstdc++-arm-none-eabi-newlib \
build-essential \
ninja-build \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Define the argument for the path
ARG PICO_PATH=/root/pico
# Clone pico-sdk repository and initialize submodules
RUN mkdir -p $PICO_PATH \
&& cd $PICO_PATH \
&& git clone https://github.com/raspberrypi/pico-sdk.git --branch master \
&& cd pico-sdk \
&& git submodule update --init
ENV PICO_SDK_PATH=$PICO_PATH/pico-sdk
# Clone pico-examples repository
RUN cd $PICO_PATH \
&& git clone https://github.com/raspberrypi/pico-examples.git --branch master
# Clone swift-embedded-examples repository for pico and pico-w
RUN cd $PICO_PATH \
&& git clone https://github.com/apple/swift-embedded-examples.git --depth 1 --filter=blob:none --sparse \
&& cd swift-embedded-examples \
&& git sparse-checkout set pico-blink-sdk pico-w-blink-sdk \
&& git pull origin main
# Set entrypoint
ENTRYPOINT ["/bin/bash"]