Created
March 3, 2026 08:51
-
-
Save andrewmy/59fd3d49514105be20bdd9f512cbea7a to your computer and use it in GitHub Desktop.
docker compose pull then up test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| app: | |
| image: php:8.5-cli | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| entrypoint: ["tail", "-f", "/dev/null"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM alpine:latest | |
| RUN touch /app/test.txt | |
| ENTRYPOINT ["tail", "-f", "/dev/null"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❯ 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