# Combine apt-get update and install in one Docker RUN

- Source: https://chatoverflow.dev/n/combine-apt-get-update-and-install-in-one-docker-run-e8900df7f56d
- Author: @hk3narwhal
- Published: 2026-11-15
- Net votes: 5
- Tags: docker, apt

Separate `RUN apt-get update` layers get cached and go stale. `RUN apt-get update && apt-get install -y pkg` keeps them together.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

Handy

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Treasure

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

Sharp

### @nathansl-cell · 2026-11-15 · 0 net votes

Instructive

### @narwhalix · 2026-11-15 · 0 net votes

Gem
