mirror of
https://github.com/licsber/Dockerfile.git
synced 2024-09-17 01:18:47 +08:00
add esp32 micropython.
This commit is contained in:
parent
fd4b5a1a33
commit
c8fe393d7b
30
micropython/esp32/Dockerfile
Normal file
30
micropython/esp32/Dockerfile
Normal file
@ -0,0 +1,30 @@
|
||||
FROM docker.io/ubuntu:jammy
|
||||
LABEL org.opencontainers.image.authors="licsber<admin@licsber.site>"
|
||||
|
||||
WORKDIR /licsber
|
||||
|
||||
ADD tuna.sources.list /etc/apt/sources.list
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git python3 python3-pip libusb-1.0-0-dev cmake && \
|
||||
apt-get autoclean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone -b v5.0.4 --recursive https://github.com/espressif/esp-idf.git
|
||||
|
||||
ENV IDF_PATH='/licsber/esp-idf'
|
||||
|
||||
RUN cd esp-idf && \
|
||||
./install.sh && \
|
||||
rm -rf /root/.cache && \
|
||||
rm -rf /root/.espressidf/dist
|
||||
|
||||
RUN git clone https://github.com/licsber/micropython.git
|
||||
|
||||
RUN cd micropython && \
|
||||
make -C mpy-cross
|
||||
|
||||
RUN cd micropython && \
|
||||
cd ports/esp32 && \
|
||||
make submodules && \
|
||||
. "$IDF_PATH/export.sh" && \
|
||||
make BOARD=LICSBER_8M_W5500
|
15
micropython/esp32/build.sh
Executable file
15
micropython/esp32/build.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
REGISTRY='registry.cn-beijing.aliyuncs.com'
|
||||
NAMESPACE='licsber'
|
||||
NAME='micropython-esp32'
|
||||
# 2023-01-22-1415-CST
|
||||
TAG=`date +%F-%H%M-CST`
|
||||
|
||||
IMAGE="$REGISTRY/$NAMESPACE/$NAME"
|
||||
echo "$IMAGE:$TAG"
|
||||
sudo docker build -t "$IMAGE:$TAG" .
|
||||
sudo docker push "$IMAGE:$TAG"
|
||||
sudo docker tag "$IMAGE:$TAG" "$IMAGE:latest"
|
||||
sudo docker rmi "$IMAGE:$TAG"
|
||||
sudo docker push "$IMAGE:latest"
|
8
micropython/esp32/debug.sh
Executable file
8
micropython/esp32/debug.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
REGISTRY='registry.cn-beijing.aliyuncs.com'
|
||||
NAMESPACE='licsber'
|
||||
NAME='micropython-esp32'
|
||||
IMAGE="$REGISTRY/$NAMESPACE/$NAME"
|
||||
|
||||
sudo docker run --rm -it "$IMAGE" bash
|
17
micropython/esp32/tuna.sources.list
Normal file
17
micropython/esp32/tuna.sources.list
Normal file
@ -0,0 +1,17 @@
|
||||
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
|
||||
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
|
||||
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
|
||||
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
|
||||
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
|
||||
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
|
||||
# deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
|
||||
|
||||
# deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
|
||||
# # deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
|
||||
|
||||
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
|
||||
# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
|
||||
|
||||
# 预发布软件源,不建议启用
|
||||
# deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
|
||||
# # deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
|
Loading…
Reference in New Issue
Block a user