2
0

Dockerfile 1.4 KB

1234567891011121314151617181920212223242526272829
  1. FROM ubuntu
  2. # Set timezone to UTC
  3. RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone
  4. RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev python3-subunit mesa-common-dev zstd liblz4-tool file locales libacl1 vim && apt clean -y && rm -rf /var/lib/apt/lists/*
  5. RUN locale-gen en_US.UTF-8
  6. # Add in non-root user
  7. ENV UID_OF_DOCKERUSER 1000
  8. RUN useradd -m -s /bin/bash -g users -u ${UID_OF_DOCKERUSER} dockerUser
  9. RUN chown -R dockerUser:users /home/dockerUser && chown dockerUser:users /opt
  10. USER dockerUser
  11. RUN cd /opt && git clone git://git.yoctoproject.org/poky
  12. WORKDIR /opt/poky
  13. ARG YOCTO_VERSION=kirkstone
  14. RUN git checkout -t origin/${YOCTO_VERSION} -b ${YOCTO_VERSION} && git pull
  15. # This arg is to be able to force a rebuild starting from this line
  16. ARG DUMMY=date
  17. RUN DUMMY=${DUMMY} git clone --single-branch --branch=master https://github.com/wolfssl/meta-wolfssl.git && \
  18. /bin/bash -c "source oe-init-build-env" && \
  19. echo 'IMAGE_INSTALL:append = " wolfssl wolfclu wolfssh wolfmqtt wolftpm wolfclu "' >> /opt/poky/build/conf/local.conf && \
  20. sed -i '/\/opt\/poky\/meta-poky \\/a \\t/opt/poky/meta-wolfssl \\' /opt/poky/build/conf/bblayers.conf
  21. RUN /bin/bash -c "source oe-init-build-env && bitbake core-image-minimal"