I am building Django app where I want to run Django and playwright images in 1 container in Docker Desktop (locally).
Below you can see my docker-compose.yml
file:
version: '3.8'
services:
web:
build: ./docker_playwright_test
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./docker_playwright_test/:/usr/src/docker_playwright_test/
ports:
- 8000:8000
Django is running fine on my localhost but I am not sure how to add Playwright image to docker-compose file?
2
Answers
Step 1: make sure you’re in Linux Container in Docker.
Step 2: Go to
C:Users[User Name].dockerconfig.json
Replace credsStore to credStore
Step 3: create Dockerfile, .dockerignore and docker-compose.yml file
Step 4: docker-compose format.
try to use sam ports as I mentioned here.
User = sa
,Database = master
It will run perfectly fine. IA.
You can add the Dockerfile within the service and build key (with configuration options applied at build time), like this:
then, you can specify the Docker image in the specified Dockerfile, like this:
Otherwise, you can specify the Docker image in the docker-compose file in the service section: