Docker Image build with modified Autoware source.
Hello everyone,
Currently, I am using Autoware 1.12.0 with source build. I have modified a few code and its working well with the source build. Now, I am trying to build docker image for modified Autoware source code, and following is my docker file structure.
ARG FROM_ARG
# hadolint ignore=DL3006
FROM ${FROM_ARG}
ARG ROS_DISTRO
ARG VERSION
ENV USERNAME autoware
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Build Autoware
COPY ./MY_MODIFIED_CODE_DIR /home/$USERNAME/Autoware
RUN su -c "source /opt/ros/$ROS_DISTRO/setup.bash; \
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release'" $USERNAME
RUN echo "source /home/$USERNAME/Autoware/install/local_setup.bash" >> \
/home/$USERNAME/.bashrc
COPY ./entrypoint.sh /tmp
ENTRYPOINT ["/tmp/entrypoint.sh"]
But i am getting error after running ./build.sh command, with the following error statement.
bash: -c: line 0: unexpected EOF while looking for matching `''
bash: -c: line 1: syntax error: unexpected end of file
The command '/bin/bash -o pipefail -c su -c "source /opt/ros/$ROS_DISTRO/setup.bash;
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release'" $USERNAME' returned a non-zero code: 1
I guess, its because some syntax error in the dockerfile, please can anyone help me how to get rid of this error.