Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example build_mount_cache_apt #181

Open
ondrejsika opened this issue Jan 30, 2024 · 0 comments
Open

Add example build_mount_cache_apt #181

ondrejsika opened this issue Jan 30, 2024 · 0 comments

Comments

@ondrejsika
Copy link
Owner

FROM ubuntu
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
ARG PACKAGES="vim"
RUN \
  --mount=type=cache,target=/var/cache/apt \
  --mount=type=cache,target=/var/lib/apt \
  apt update && \
  apt-get install -y --no-install-recommends \
    $PACKAGES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant