Skip to content

Commit

Permalink
pinned dependencies, cleaned up dependencies, added lines to delete a…
Browse files Browse the repository at this point in the history
…pt-get lists, updated dockerfile to use WORKDIR

Signed-off-by: Joshua Hoshiko <[email protected]>
  • Loading branch information
jhoshiko committed Mar 25, 2024
1 parent 98046f1 commit d7a3d5a
Showing 1 changed file with 25 additions and 34 deletions.
59 changes: 25 additions & 34 deletions yocto/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,38 @@ FROM debian:trixie-slim
# add a user to run bitbake
RUN useradd -ms /bin/bash user1

# install dependencies
# install dependencies
RUN apt-get update \
&& apt-get --no-install-recommends -y install \
tini \
wget \
ovmf \
nginx \
swtpm \
procps \
iptables \
iproute2 \
apt-utils \
dnsmasq \
net-tools \
qemu-utils \
ca-certificates \
netcat-openbsd \
qemu-system-x86 \
ca-certificates=20240203 \
wget=1.21.4-1+b1 \
patch=2.7.6-7 \
vim=2:9.1.0016-1 \
python-is-python3=3.11.4-1 \
bzip2=1.0.8-5.1 \
binutils=2.42-4 \
cpio=2.15+dfsg-1 \
chrpath=0.16-2+b1 \
cpp=4:13.2.0-7 \
diffstat=1.66-1 \
file=1:5.45-2+b1 \
g++=4:13.2.0-7 \
gawk=1:5.2.1-2 \
git=1:2.43.0-1 \
lz4=1.9.4-1+b2 \
make=4.3-4.1 \
zstd=1.5.5+dfsg2-2 \
locales=2.37-15 \
&& apt-get clean \
&& novnc="1.4.0" \
&& mkdir -p /usr/share/novnc \
&& wget https://github.com/novnc/noVNC/archive/refs/tags/v"$novnc".tar.gz -O /tmp/novnc.tar.gz -q \
&& tar -xf /tmp/novnc.tar.gz -C /tmp/ \
&& cd /tmp/noVNC-"$novnc" \
&& mv app core vendor package.json *.html /usr/share/novnc \
&& unlink /etc/nginx/sites-enabled/default \
&& sed -i 's/^worker_processes.*/worker_processes 1;/' /etc/nginx/nginx.conf \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# install additional dependencies
RUN apt-get update && apt-get install -y vim python-is-python3 bzip2 binutils cpio \
chrpath cpp diffstat file g++ gawk git lz4 make zstd
&& rm -rf /var/lib/apt/lists/*

# add yocto release files
RUN mkdir yocto_release
ADD poky-bf9f2f6f60387b3a7cd570919cef6c4570edcb82.tar.bz2 ./yocto_release
RUN mv ./yocto_release /home/user1/
RUN chown -R user1: /home/user1/yocto_release

# reconfigure locales
RUN apt-get clean && apt-get update && apt-get install -y locales
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
Expand All @@ -50,7 +43,5 @@ ENV LC_ALL en_US.UTF-8

# build yocto image
USER user1
RUN cp -r yocto_release ~/ \
&& cd ~/yocto_release/poky/ \
&& . ./oe-init-build-env \
&& bitbake core-image-minimal
WORKDIR /home/user1/yocto_release/poky/
RUN . ./oe-init-build-env && bitbake core-image-minimal

0 comments on commit d7a3d5a

Please sign in to comment.