1- FROM osrf/ros:noetic-desktop-full AS amd64_build_state
2- FROM arm64v8/ros:noetic-perception-focal AS arm64_build_state
3- FROM ${TARGETARCH}_build_state AS final_stage
4-
5- ARG TARGETARCH
6- ARG TARGETPLATFORM
7-
8- LABEL architecture=$TARGETARCH
9-
101ARG USER_UID=1000
112ARG USER_GID=$USER_UID
123
@@ -134,19 +125,11 @@ RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main"
134125 python3-argcomplete \
135126 python3-rosdep python3-vcstool
136127
137- # vscode
138- RUN curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg && \
139- install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg && \
140- sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list' && \
141- rm -f packages.microsoft.gpg
142-
143128# install depending packages
144- RUN apt-get update && apt-get upgrade -y && \
145- apt-get install -y bash-completion \
129+ RUN apt-get install -y bash-completion \
146130 less \
147131 wget \
148132 language-pack-en \
149- code \
150133 vim-tiny \
151134 iputils-ping \
152135 net-tools \
@@ -162,9 +145,8 @@ RUN lesspipe >> ~/.bashrc && \
162145 curl -sSL https://raw.githubusercontent.com/CoeJoder/lessfilter-pygmentize/master/.lessfilter > ~/.lessfilter && \
163146 chmod 755 ~/.lessfilter
164147
165- # global vscode config
148+ # prepare vscode and home
166149ADD .devcontainer/.vscode /home/ubuntu/.vscode
167- RUN ln -s /home/ubuntu/.vscode /home/ubuntu/.vscode-server
168150RUN sudo chown -R ubuntu:ubuntu /home/ubuntu
169151
170152# Source ROS environment automatically
@@ -214,12 +196,6 @@ COPY configs/ros_file_templates /home/ubuntu/ros_file_templates
214196RUN chown -R "$USERNAME:$USERNAME" "/home/ubuntu"
215197RUN sed -i "s/password = WebUtil.getConfigVar('password');/password = '$PASSWD'/" /usr/lib/novnc/app/ui.js
216198
217- # fix arm64 shared library for vscode and vnc services
218- RUN if [ "$TARGETARCH" == "arm64" ]; then \
219- wget http://ports.ubuntu.com/pool/main/libf/libffi/libffi8_3.4.2-4_arm64.deb -P /tmp && \
220- dpkg -i /tmp/libffi8_3.4.2-4_arm64.deb; \
221- fi
222-
223199# prepare logger
224200RUN mkdir -p /var/log/val_logger/noetic_devel
225201RUN chown -R ubuntu: /var/log/val_logger/
@@ -229,28 +205,4 @@ RUN echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf && \
229205 echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf && \
230206 echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf && \
231207 echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf && \
232- sysctl -p
233-
234- # install code plugins and rosdep dependencies using the default user
235- USER $USERNAME
236-
237- RUN echo -e "TARGETARCH1: $TARGETARCH" >> /home/ubuntu/test.txt
238-
239- RUN touch /home/ubuntu/.Xauthority
240-
241- RUN echo "export PS1='[docker]\[\e [38;5;216m\]\u\[\e [38;5;160m\] @\[\e [38;5;202m\]\h \[\e [38;5;131m\]\w \[\0 33[0m\] $ '" >> /home/ubuntu/.bashrc
242-
243- # TODO: add the git clone command of your repo here
244-
245- # disable temporarily due to the lack of cache in this command
246- # RUN code --install-extension ms-python.python && \
247- # code --install-extension ms-vscode.cpptools-extension-pack && \
248- # code --install-extension redhat.vscode-xml
249-
250- RUN mkdir -p /home/ubuntu/ros_ws/src
251- RUN chown -R ubuntu:ubuntu /home/ubuntu/
252-
253- # RUN rosdep update
254-
255- ENTRYPOINT [ "/entrypoint.sh" ]
256- CMD [ "sudo" , "-E" , "/usr/bin/supervisord" , "-c" , "/etc/supervisor/supervisord.conf" ]
208+ sysctl -p
0 commit comments