Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

For containers managed by Docker Compose, update one project at a time: run docker compose pull, then docker compose up -d from the directory containing its Compose file. Compose downloads newer service images and recreates containers whose image or configuration changed. Add --pull always --force-recreate when you deliberately want to check the registry and recreate every service. Repeat the process for every separate Compose project. Containers created with standalone docker run require a separate, configuration-preserving recreation; no universal one-line command can safely update them.

What “update all containers” actually means

Docker has no single global update operation that safely covers every container on a Linux server. The correct procedure depends on how each container was created and which Compose project owns it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Compose-managed services: update each Compose project with docker compose pull followed by docker compose up -d.
  • Standalone containers: pull the replacement image and recreate each container from its original environment, mounts, ports, networks, restart policy and entrypoint.
  • Automatically monitored containers: an updater such as Watchtower can poll images and recreate selected containers, but it should be deployed only after you have defined backup, health-check, maintenance-window and rollback rules.

A Compose command is scoped to one project. If a server has five unrelated Compose files, you must run the workflow five times, using the correct file for each project. It does not discover or update containers created with docker run.

Before updating: inventory scope and risk

Updating an image can change application behavior, database requirements, configuration defaults or exposed interfaces. Spend a few minutes identifying what will restart before pulling anything.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Find every Compose project

Locate the Compose files used by your services, including files outside your current working directory. A typical project directory contains compose.yaml, compose.yml or a legacy docker-compose.yml. Record the absolute path and the services it controls.

For a file stored elsewhere, use the -f option on every command:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker compose -f /srv/apps/example/compose.yaml ps

If you rely on the COMPOSE_FILE environment variable, verify that it points to the intended file before running an update. Accidentally selecting a different project can restart the wrong workload.

Separate projects that should not restart together

A Linux server may host independent applications, a reverse proxy, databases, monitoring and scheduled jobs. Treat each Compose file as a separate change scope. Update related services together only when their Compose project defines them together and their release notes or migration instructions require coordinated changes.

Verify backups and state

Confirm that database backups can be restored and that important bind-mounted and named-volume data is included. Container recreation normally preserves mounted volumes, but that is not a substitute for an application-level backup. A new image may require a schema migration or may expose a latent data problem, so keep a known-good backup and the previous image digest available.

Review tags, credentials and release notes

  • Mutable tags such as latest can point to a different image without changing the Compose file. Pinned version tags or digests make changes easier to review and roll back.
  • Confirm that private-registry credentials are still available to the Docker client that will pull the image.
  • Read the image maintainer’s release notes for breaking changes, required environment variables and database migrations.
  • Check whether the service has health checks, dependent services, background workers or a maintenance window.

The standard Compose update procedure

Use this sequence for each project. Replace the path with the location of the project’s Compose file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Change to the project directory or select the file explicitly:
    cd /srv/apps/example

    Alternatively, keep your current directory and add -f /srv/apps/example/compose.yaml to each command.

  2. Inspect the current state:
    docker compose ps

    Note which services are running, their health state and any service that is already restarting or unhealthy.

    Rank #2
    EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
    • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
    • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
    • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
    • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
    • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
  3. Pull service images:
    docker compose pull

    This asks the registry for the images referenced by the selected Compose file. It downloads newer layers when the tag resolves to a newer image; it does not recreate or restart containers by itself.

  4. Recreate changed services in the background:
    docker compose up -d

    up creates and starts services. When Compose detects that an image or service configuration changed, it stops and recreates that service. The -d (detached) option leaves services running after the command returns.

    What’s actually slowing this PC down?

    Pick the symptom - the matching free tool is one click away.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  5. Check the result:
    docker compose ps
    docker compose logs --tail=100

    Look for a healthy status, expected published ports, successful dependency startup and the absence of migration or permission errors. Exercise the application endpoint and any important background job.

The same process with an explicit file is:

docker compose -f /srv/apps/example/compose.yaml pull
docker compose -f /srv/apps/example/compose.yaml up -d

When to use --force-recreate and --pull always

Force recreation of every service

Normal up recreates services when Compose sees an image or configuration change. To recreate every container in the selected project even when Compose considers it unchanged, run:

docker compose up -d --force-recreate

Docker’s Compose reference describes --force-recreate as the way to force Compose to stop and recreate all containers. This is useful after changing external state that Compose cannot detect, or when you want every service to pass through the same replacement process.

Make the start command pull first

To have the up command check the registry before starting services, use:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker compose up -d --pull always

To both check for new images and recreate every service:

docker compose up -d --pull always --force-recreate

This combines image retrieval and startup in one command. The two-step pull then up workflow is often easier to review because you can see pull errors before any service is stopped.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Do not confuse start with an update

docker compose start starts containers that already exist and are stopped. It does not pull new images and does not create replacement containers. Use up for an update or for starting the complete set of services defined by the Compose file.

Updating multiple Compose projects safely

Repeat the workflow for each project instead of issuing one command from an arbitrary directory. A simple runbook looks like this:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. List the project paths and the services each one owns.
  2. Choose an order that respects dependencies. For example, update a database-backed application during its maintenance window and verify it before moving to the next project.
  3. Back up the data used by the project.
  4. Run pull, inspect the output and then run up -d.
  5. Check service health, logs, endpoints and scheduled work.
  6. Record the new image digest and retain the prior digest and Compose configuration for rollback.

Do not assume that two files with similarly named services are one project. Compose project names, networks and volumes determine ownership. Updating one file does not update a second file unless both are explicitly selected for the same invocation.

What happens to volumes and persistent data?

During normal Compose recreation, mounted volumes are preserved and attached to the replacement container. This keeps application data available across an image update. It does not guarantee that the new application version can read that data.

  • Follow the application’s database migration instructions before or during the deployment.
  • Back up named volumes and bind-mounted directories using a method appropriate for the application, especially for databases.
  • Do not delete volumes merely to “fix” an update. Removing a volume can permanently remove state.
  • Verify file ownership and permissions if the new image uses a different user ID.

A successful container start is not proof that the data is correct. Check application-level health, recent records, queues and scheduled jobs after the update.

Why docker compose down is usually unnecessary

docker compose up -d can stop and recreate changed services without first removing the entire project. This normally gives a smaller change window and avoids removing project resources that you still need.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use docker compose down only when you intentionally need to remove the project’s containers and networks or have a documented reason to perform a full teardown. Be especially careful with options that remove volumes. A down-and-up cycle also creates a longer interruption and gives you more opportunities to reconnect a service incorrectly.

Standalone containers created with docker run

A container launched with docker run has no Compose file that records its complete desired state. The image name alone is insufficient: the replacement must preserve environment variables, bind mounts, named volumes, published ports, networks, restart policy, labels, capabilities, entrypoint and command.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Why there is no safe universal command

Two containers may both run from the same image while requiring completely different ports, secrets and storage. A generic “update all” command could recreate a container without its data mount, expose a port incorrectly or start it with the wrong command. Docker therefore cannot infer a universally safe replacement procedure for arbitrary standalone containers.

Record the existing configuration

Before stopping a standalone container, identify its image and inspect its configuration:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker ps --format 'table {{.Names}}	{{.Image}}	{{.Status}}'
docker inspect <container_name>

Save the relevant environment, mounts, port bindings, networks, restart policy and command in a version-controlled runbook. Treat secrets carefully; do not commit credentials to a public repository.

Recreate one standalone container

  1. Read the image’s release notes and verify a backup.
  2. Pull the replacement image, preferably by an explicit version or digest:
    docker pull repository/image:version
  3. Stop the old container without deleting its volumes:
    docker stop <container_name>
  4. Remove only the container object, not the data volumes:
    docker rm <container_name>
  5. Run a new container with the same mounts, ports, networks, environment and restart policy. Use the exact command captured in your runbook, changing only the image reference where appropriate.
  6. Check logs, health and the application endpoint before moving to another container.

If a service is important enough to update repeatedly, migrate its definition into a version-controlled Compose file. That makes the desired state reviewable and gives you a repeatable update and rollback procedure.

Automatic updates with Watchtower

Watchtower is an optional containerized updater. Its documented quick-start behavior monitors running containers, polls for updated image digests every 24 hours by default, pulls an updated image, gracefully shuts down the target container and its dependencies, and starts a replacement while maintaining the previous configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Automatic monitoring can reduce routine maintenance, but it changes the operational model from deliberate deployments to unattended restarts. Decide which containers are eligible and whether a service should be monitored only or automatically replaced. Watchtower’s container-selection controls support narrower scopes than “everything running.”

Manual Compose updates versus automatic monitoring

Consideration Manual Compose workflow Automatic updater
Maintenance window You choose when pull and up run. Updates occur according to the polling and selection policy; the default polling interval is 24 hours.
Release review You can read release notes and inspect the pull before recreation. An image may be replaced before someone reviews its changes.
Scope Explicitly limited to the Compose project and file you select. Depends on monitor and selection settings; an overly broad policy can affect unintended containers.
Rollback You can restore the previous tag or digest and rerun Compose. Requires retained image references, configuration and an operational procedure.
Restart timing Planned and observable during a maintenance window. May happen automatically while users or jobs are active.
Notifications and monitoring Provided by your deployment runbook and monitoring stack. Still must be configured and verified; automation is not a substitute for health alerts.

Safeguards for unattended updates

  • Back up databases and persistent application data before allowing automatic replacement.
  • Use health checks and alerting that detect a container that starts but cannot serve correctly.
  • Define a maintenance window or restrict automatic updates to low-risk services.
  • Use disciplined image tags or digests; do not allow an unexpected tag change to become an unreviewed production deployment.
  • Keep the previous image digest and Compose or run configuration so you can recreate the prior version.
  • Test migrations and recovery on a non-production instance first.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verification after an update

Run checks at three levels rather than relying only on a “running” status.

Container and health status

docker compose ps

Confirm that every expected service is running and healthy. A container can be running while its process is repeatedly failing or its health check is reporting an error.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Logs and dependencies

docker compose logs --tail=100 <service_name>

Review startup logs for failed migrations, missing variables, authentication errors, permission problems and connection failures to dependent services. Check the database, cache, queue or reverse proxy that the application relies on.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Functional checks

  • Open the service through its normal endpoint and authenticate with a test account.
  • Submit a harmless read or write operation appropriate to the application.
  • Confirm background workers process a test job and scheduled tasks remain enabled.
  • Check externally exposed ports and TLS termination if the update includes a web-facing service.
  • Watch resource use after startup; a migration or changed default can increase CPU, memory or disk consumption.

Rollback when the new image fails

Rollback is easiest when the previous image reference and configuration were recorded before the update.

  1. Stop traffic or place the application in its maintenance mode if continuing to serve requests could damage data.
  2. Capture logs and the failing image digest so the incident is diagnosable.
  3. Change the Compose image reference back to the known-good version or digest. For a standalone container, restore the saved docker run configuration.
  4. Run docker compose pull if the rollback image is not local, then run docker compose up -d.
  5. Verify health, data consistency and background jobs before reopening traffic.
  6. Handle any database migration according to the application’s documented downgrade or restore procedure. Reverting an image does not automatically reverse a schema change.

Do not use docker compose down as a first response to a failed update. Preserve volumes and the evidence needed to determine whether the fault is the image, configuration, dependency or data migration.

Common failure modes and fixes

“Pull succeeded, but the old container is still running”

docker compose pull only downloads images. Run docker compose up -d to let Compose recreate services that use the changed image, or add --force-recreate when every service must be replaced.

“Nothing changed after pulling”

The tag may still resolve to the same digest, or Compose may not see a configuration difference. Inspect the pull output and use docker compose up -d --pull always --force-recreate when you intentionally need a fresh check and full recreation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“A service starts but is unhealthy”

Read the service logs and health-check output, then check dependencies, required variables, file permissions, migrations and available disk space. A running process is not the same as a healthy application.

“The command updates only some containers”

You may be operating on one Compose project while other services belong to different files, or the remaining containers may be standalone. Inventory project paths and handle each scope separately.

“The new image cannot access its data”

Confirm that the original named volume or bind mount was preserved, that the host path is correct and that the new image’s user has permission to read it. Do not delete the volume while troubleshooting.

“The registry refuses the pull”

Check the image name, tag, registry login, network connectivity and rate or permission limits. A failed pull should be resolved before stopping a production container unless you already have a local, verified replacement image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A repeatable update checklist

  • Identify the Compose file or standalone run configuration.
  • Confirm the exact services and restart impact.
  • Verify restorable backups and application migration guidance.
  • Record current image tags or digests and configuration.
  • Pull images for the selected project.
  • Run docker compose up -d, or use --pull always --force-recreate when that deliberate behavior is required.
  • Inspect status, health and logs.
  • Exercise endpoints, workers and dependent services.
  • Record the new digest and retain rollback materials.
  • Repeat for each independent Compose project; update standalone containers from their saved configuration.

The Bottom Line

Use docker compose pull followed by docker compose up -d for each Compose project. Add --pull always --force-recreate for an explicit full refresh, protect persistent data with verified backups, and handle docker run containers individually because their original configuration must be reproduced.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.