Skip to content

Commit

Permalink
add forgotten build dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mjleehh committed Dec 14, 2024
1 parent 41c0c63 commit c224e24
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tools/bin/tbb
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
#!/usr/bin/env bash

if [ -z "$ESP_IDF_VERSION" ] && [ $TBD_IN_CONTAINER -eq 1 ]; then
source "$TBD_IDF_ACTIVATE"
fi

TBD_TOOL_MAIN="$(dirname -- $(dirname -- ${BASH_SOURCE[0]}))/tbdtools/__main__.py"
export LOGURU_LEVEL=WARNING
if [ -z "$TBD_PROJECT_DIR" ]; then
TBD_TOOL_MAIN="$(dirname -- $(dirname -- ${BASH_SOURCE[0]}))/tbdtools/__main__.py"
else
cd "$TBD_PROJECT_DIR"
TBD_TOOL_MAIN="$TBD_PROJECT_DIR/tools/tbdtools/__main__.py"
fi

export

export LOGURU_LEVEL=DEBUG
platform="$1"
shift

Expand Down
59 changes: 59 additions & 0 deletions tools/docker/build.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
ARG TBD_IDF_VERSION=v5.4

#### c++ build ####

FROM espressif/idf:release-${TBD_IDF_VERSION} AS cpp_stage

# tbd runtime config
ENV TBD_ENV_NO_TBD_CMD=0
ENV TBD_ENV_NO_IDF_CMD=0

# container build config
ENV TBD_PROJECT_DIR=/code

# non config constants
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV TBD_IN_CONTAINER=1
ARG TBD_PATH=/opt/tbd
ENV TBD_IDF_PATH=/opt/esp/idf
ENV TBD_IDF_ACTIVATE=$TBD_IDF_PATH/export.sh
ARG TBD_INIT=$TBD_PATH/tbd-init.sh

RUN . "$TBD_IDF_ACTIVATE" && pip install \
sphinx \
pydata-sphinx-theme \
sphinxcontrib-youtube \
esbonio \
breathe

RUN . "$TBD_IDF_ACTIVATE" && pip install \
typer \
cxxheaderparser \
jinja2 \
GitPython \
loguru \
pyhumps \
pydantic \
pyyaml

RUN git config --global --add safe.directory "$TBD_PROJECT_DIR"
COPY --chmod=755 tools/bin/tbb /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

# RUN apt-get update -y && apt-get install -y \
# udev \
# software-properties-common \
# alsa-utils \
# bash-completion \
# pulseaudio \
# libpixman-1-0 \
# libsdl2-2.0-0 \
# libslirp0 \
# libboost-all-dev \
# libasound2-dev \
# libglib2.0-dev \
# libgcrypt20-dev \
# fish \
# micro

0 comments on commit c224e24

Please sign in to comment.