Skip to content

Instantly share code, notes, and snippets.

@andrewmy
Created March 3, 2026 08:51
Show Gist options
  • Select an option

  • Save andrewmy/59fd3d49514105be20bdd9f512cbea7a to your computer and use it in GitHub Desktop.

Select an option

Save andrewmy/59fd3d49514105be20bdd9f512cbea7a to your computer and use it in GitHub Desktop.
docker compose pull then up test
services:
app:
image: php:8.5-cli
build:
context: .
dockerfile: Dockerfile
entrypoint: ["tail", "-f", "/dev/null"]
FROM alpine:latest
RUN touch /app/test.txt
ENTRYPOINT ["tail", "-f", "/dev/null"]
❯ docker compose pull
[+] Pulling 1/1
✔ app Pulled 1.1s
❯ docker compose up -d
[+] Running 1/1
✔ Container dtest-app-1 Started 0.1s
❯ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5c1975103561 php:8.5-cli "tail -f /dev/null" 20 seconds ago Up 2 seconds dtest-app-1
# notice the image is from the compose, not dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment