Daily challenges →
🌊 Docker easy ⚡ 45 XP

Does the EXPOSE instruction publish the port to the host?

EXPOSE is documentation only — to publish a port to the host use -p 8080:80 in docker run or ports: in Compose. EXPOSE enables -P to auto-publish to random host ports.

🌊 This is a free sample — 507+ more questions on DevOps Ocean

Sign in free to practice the full question bank with daily challenges, XP, streaks, duels and a global leaderboard.

Practice the full bank — free →