Skip to content

Commit

Permalink
reorder
Browse files Browse the repository at this point in the history
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
  • Loading branch information
youtalk committed May 27, 2024
1 parent b5dc668 commit 8c55520
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions docker/autoware-openadk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ COPY ansible/ /autoware/ansible/
WORKDIR /autoware

# Set up base environment
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
RUN --mount=type=ssh \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=ssh \
./setup-dev-env.sh -y --module base --runtime openadk \
&& pip uninstall -y ansible ansible-core \
&& apt-get autoremove -y && rm -rf "$HOME"/.cache \
Expand All @@ -45,9 +45,9 @@ WORKDIR /autoware

RUN rm -f /etc/apt/apt.conf.d/docker-clean \
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
RUN --mount=type=ssh \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=ssh \
./setup-dev-env.sh -y rosdep \
&& pip uninstall -y ansible ansible-core \
&& apt-get autoremove -y && rm -rf "$HOME"/.cache
Expand Down Expand Up @@ -81,9 +81,9 @@ ENV CXX="/usr/lib/ccache/g++"

# cspell: ignore libcu libnv
# Set up development environment
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
RUN --mount=type=ssh \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=ssh \
./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers openadk \
&& pip uninstall -y ansible ansible-core \
&& apt-get autoremove -y && rm -rf "$HOME"/.cache \
Expand All @@ -95,7 +95,6 @@ COPY --from=src-imported /rosdep-all-depend-packages.txt /tmp/rosdep-all-depend-
# hadolint ignore=SC2002
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=ssh \
apt-get update \
&& cat /tmp/rosdep-all-depend-packages.txt | xargs apt-get install -y --no-install-recommends \
&& apt-get autoremove -y && rm -rf "$HOME"/.cache
Expand All @@ -118,9 +117,9 @@ FROM prebuilt as devel
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install development tools and artifacts
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
RUN --mount=type=ssh \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=ssh \
./setup-dev-env.sh -y --module dev-tools openadk \
&& pip uninstall -y ansible ansible-core \
&& apt-get autoremove -y && rm -rf "$HOME"/.cache
Expand All @@ -140,9 +139,9 @@ ARG SETUP_ARGS
# Set up runtime environment and artifacts
COPY --from=src-imported /rosdep-exec-depend-packages.txt /tmp/rosdep-exec-depend-packages.txt
# hadolint ignore=SC2002
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
RUN --mount=type=ssh \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=ssh \
./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers --runtime openadk \
&& pip uninstall -y ansible ansible-core \
&& apt-get update \
Expand Down

0 comments on commit 8c55520

Please sign in to comment.