Dockerfile 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright (c) 2020 Project CHIP Authors
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ARG BUILD_VERSION
  15. # All tools required for compilation belong in chip-build, forms "truth" for CHIP build tooling
  16. FROM ghcr.io/project-chip/chip-build-vscode:${BUILD_VERSION}
  17. LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip
  18. # This Dockerfile contains things useful for an interactive development environment
  19. ARG USERNAME=vscode
  20. ARG USER_UID=1000
  21. ARG USER_GID=$USER_UID
  22. ENV LANG en_US.utf8
  23. # these are installed for terminal/dev convenience. If more tooling for build is required, please
  24. # add them to chip-build (in integrations/docker/images/chip-build)
  25. RUN apt-get update \
  26. && apt-get install -y locales \
  27. && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
  28. && apt-get -fy install git vim emacs sudo \
  29. apt-utils dialog zsh \
  30. iproute2 procps lsb-release \
  31. bash-completion \
  32. build-essential cmake cppcheck valgrind \
  33. wget curl telnet \
  34. docker.io \
  35. iputils-ping net-tools \
  36. libncurses5 \
  37. libncursesw5 \
  38. libpython2.7 \
  39. && :
  40. RUN groupadd -g $USER_GID $USERNAME \
  41. && useradd -s /bin/bash -u $USER_UID -g $USER_GID -G docker,sudo -m $USERNAME \
  42. && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
  43. && chmod 0440 /etc/sudoers.d/$USERNAME \
  44. && :
  45. RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/restyle-path -o /usr/local/bin/restyle-path \
  46. && chmod +x /usr/local/bin/restyle-path \
  47. && :
  48. RUN mkdir -p /opt/sdk/sdks/ \
  49. && chown -R $USERNAME:$USERNAME \
  50. /opt/sdk/sdks/ `# NXP uses a patch_sdk script to change SDK files` \
  51. /opt/espressif/esp-idf `# $USERNAME needs to own the esp-idf and tools for the examples to build` \
  52. /opt/espressif/tools \
  53. /opt/NordicSemiconductor/nrfconnect/ `# $USERNAME needs to own west configuration to build nRF Connect examples` \
  54. /opt/ubuntu-21.04-aarch64-sysroot/usr/ `# allow read/write access to header and libraries` \
  55. /opt/android/sdk `# allow licenses to be accepted` \
  56. /opt/ameba/ambd_sdk_with_chip_non_NDA/ `# AmebaD requires access to change build_info.h` \
  57. /opt/fsl-imx-xwayland/5.15-kirkstone/ \
  58. /opt/openocd \
  59. && :
  60. # Fix Tizen SDK paths for new user
  61. RUN sed -i '/^TIZEN_SDK_DATA_PATH/d' $TIZEN_SDK_ROOT/sdk.info \
  62. && echo TIZEN_SDK_DATA_PATH=/home/$USERNAME/tizen-sdk-data >> $TIZEN_SDK_ROOT/sdk.info \
  63. && ln -sf /home/$USERNAME/.tizen-cli-config $TIZEN_SDK_ROOT/tools/.tizen-cli-config \
  64. && : # last line
  65. ENV TIZEN_ROOTFS /tizen_rootfs
  66. # Fast Model GDB plugins path for debugging support
  67. ENV FAST_MODEL_PLUGINS_PATH /opt/FastModelsPortfolio_11.16/plugins/Linux64_GCC-9.3