<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processorsのトピックimx-docker: bash command not found</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx-docker-bash-command-not-found/m-p/1921024#M226782</link>
    <description>&lt;P&gt;Hi, I am trying to build the imx bsp from docker container. I follow the github nxp-imx/imx-docker repo to build the docker image &amp;amp; its container.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/nxp-imx/imx-docker" target="_blank"&gt;nxp-imx/imx-docker: i.MX Docker (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After running up the container and it caused some failures in bitbake, so I tried to attach the container to fix it. But the container can't run any bash command when I attach to it as shown below.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;user@0882fd94a700:~/Downloads/nxp/imx_docker$ ls
bash: ls: command not found
user@0882fd94a700:~/Downloads/nxp/imx_docker$ bitbake
bash: bitbake: command not found&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I build the base image as ubuntu:20.04 and run a container like&lt;/P&gt;&lt;LI-CODE lang="c"&gt;docker run -it --name ubuntu2004 ubuntu:20.04 /bin/bash&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and it can use bash command.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sample of the Dockerfile-Ubuntu20.04&lt;/P&gt;&lt;LI-CODE lang="c"&gt;FROM ubuntu:20.04

# Update system and add the packages required for Yocto builds.
# Use DEBIAN_FRONTEND=noninteractive, to avoid image build hang waiting
# for a default confirmation [Y/n] at some configurations.

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt install -y gawk wget git-core diffstat unzip texinfo \
    gcc-multilib build-essential chrpath socat cpio python python3 \
    python3-pip python3-pexpect xz-utils debianutils iputils-ping \
    libsdl1.2-dev xterm tar locales net-tools rsync sudo vim curl zstd \
    liblz4-tool libssl-dev bc lzop

# Set up locales
RUN locale-gen en_US.UTF-8 &amp;amp;&amp;amp; \
    update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8

# Yocto needs 'source' command for setting up the build environment, so replace
# the 'sh' alias to 'bash' instead of 'dash'.
RUN rm /bin/sh &amp;amp;&amp;amp; ln -s bash /bin/sh

# Install repo
ADD https://storage.googleapis.com/git-repo-downloads/repo /usr/local/bin/
RUN chmod 755 /usr/local/bin/repo

# Add your user to sudoers to be able to install other packages in the container.
ARG USER
RUN echo "${USER} ALL=(ALL) NOPASSWD: ALL" &amp;gt; /etc/sudoers.d/${USER} &amp;amp;&amp;amp; \
    chmod 0440 /etc/sudoers.d/${USER}

# Set the arguments for host_id and user_id to be able to save the build artifacts
# outside the container, on host directories, as docker volumes.
ARG host_uid \
    host_gid
RUN groupadd -g $host_gid nxp &amp;amp;&amp;amp; \
    useradd -g $host_gid -m -s /bin/bash -u $host_uid $USER

# Yocto builds should run as a normal user.
USER $USER

ARG DOCKER_WORKDIR
WORKDIR ${DOCKER_WORKDIR}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know what made the docker container can not use the bash command in the Dockerfile. Can some one help me figure this out ?&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jul 2024 01:56:53 GMT</pubDate>
    <dc:creator>AlanWen</dc:creator>
    <dc:date>2024-07-31T01:56:53Z</dc:date>
    <item>
      <title>imx-docker: bash command not found</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx-docker-bash-command-not-found/m-p/1921024#M226782</link>
      <description>&lt;P&gt;Hi, I am trying to build the imx bsp from docker container. I follow the github nxp-imx/imx-docker repo to build the docker image &amp;amp; its container.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/nxp-imx/imx-docker" target="_blank"&gt;nxp-imx/imx-docker: i.MX Docker (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After running up the container and it caused some failures in bitbake, so I tried to attach the container to fix it. But the container can't run any bash command when I attach to it as shown below.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;user@0882fd94a700:~/Downloads/nxp/imx_docker$ ls
bash: ls: command not found
user@0882fd94a700:~/Downloads/nxp/imx_docker$ bitbake
bash: bitbake: command not found&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I build the base image as ubuntu:20.04 and run a container like&lt;/P&gt;&lt;LI-CODE lang="c"&gt;docker run -it --name ubuntu2004 ubuntu:20.04 /bin/bash&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and it can use bash command.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sample of the Dockerfile-Ubuntu20.04&lt;/P&gt;&lt;LI-CODE lang="c"&gt;FROM ubuntu:20.04

# Update system and add the packages required for Yocto builds.
# Use DEBIAN_FRONTEND=noninteractive, to avoid image build hang waiting
# for a default confirmation [Y/n] at some configurations.

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt install -y gawk wget git-core diffstat unzip texinfo \
    gcc-multilib build-essential chrpath socat cpio python python3 \
    python3-pip python3-pexpect xz-utils debianutils iputils-ping \
    libsdl1.2-dev xterm tar locales net-tools rsync sudo vim curl zstd \
    liblz4-tool libssl-dev bc lzop

# Set up locales
RUN locale-gen en_US.UTF-8 &amp;amp;&amp;amp; \
    update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8

# Yocto needs 'source' command for setting up the build environment, so replace
# the 'sh' alias to 'bash' instead of 'dash'.
RUN rm /bin/sh &amp;amp;&amp;amp; ln -s bash /bin/sh

# Install repo
ADD https://storage.googleapis.com/git-repo-downloads/repo /usr/local/bin/
RUN chmod 755 /usr/local/bin/repo

# Add your user to sudoers to be able to install other packages in the container.
ARG USER
RUN echo "${USER} ALL=(ALL) NOPASSWD: ALL" &amp;gt; /etc/sudoers.d/${USER} &amp;amp;&amp;amp; \
    chmod 0440 /etc/sudoers.d/${USER}

# Set the arguments for host_id and user_id to be able to save the build artifacts
# outside the container, on host directories, as docker volumes.
ARG host_uid \
    host_gid
RUN groupadd -g $host_gid nxp &amp;amp;&amp;amp; \
    useradd -g $host_gid -m -s /bin/bash -u $host_uid $USER

# Yocto builds should run as a normal user.
USER $USER

ARG DOCKER_WORKDIR
WORKDIR ${DOCKER_WORKDIR}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know what made the docker container can not use the bash command in the Dockerfile. Can some one help me figure this out ?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 01:56:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx-docker-bash-command-not-found/m-p/1921024#M226782</guid>
      <dc:creator>AlanWen</dc:creator>
      <dc:date>2024-07-31T01:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: imx-docker: bash command not found</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx-docker-bash-command-not-found/m-p/1921083#M226784</link>
      <description>&lt;P&gt;Hi &lt;BR /&gt;&lt;SPAN&gt;If I build the base image as ubuntu:20.04 and run a container like,and it can use bash command.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;--&amp;gt;This is correct step, you can only use bash command after you run it.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;Zhiming&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 02:43:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx-docker-bash-command-not-found/m-p/1921083#M226784</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2024-07-31T02:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: imx-docker: bash command not found</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx-docker-bash-command-not-found/m-p/1921093#M226788</link>
      <description>&lt;P&gt;But with the script docker-run.sh and attached the container, the bash command failed. Now I figure the problem may be the docker volume arguments and bash command that something had conflict in docker-run.sh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;docker run -it --rm \
    --volume ${HOME}:${HOME} \
    --volume ${DOCKER_WORKDIR}:${DOCKER_WORKDIR} \
    --volume $(pwd)/${IMX_RELEASE}:${DOCKER_WORKDIR}/${IMX_RELEASE} \
    "${DOCKER_IMAGE_TAG}" \
    $1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;If I replaced the $1 to /bin/bash and it would cause the command not found problem.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 02:52:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx-docker-bash-command-not-found/m-p/1921093#M226788</guid>
      <dc:creator>AlanWen</dc:creator>
      <dc:date>2024-07-31T02:52:32Z</dc:date>
    </item>
  </channel>
</rss>

