-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
26 lines (24 loc) · 1.16 KB
/
docker-compose.yml
File metadata and controls
26 lines (24 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
version: '3'
services:
web:
# build: .
# Build using this path, and we get error as described below
# Creating network "frontend_default" with the default driver
# Building web
# ERROR: Cannot locate specified Dockerfile: Dockerfile
build:
context: . # Setup context of, where are we building from ?
dockerfile: Dockerfile.dev # Which docker file to use to build the image
ports:
- "3000:3000" # Map port outside the container: to inside the container
volumes:
- /app/node_modules # Bring this volume to the container
- .:/app # Map "." outside the container as a volume to within the container at "/app" location
tests:
build:
context: . # Setup context of, where are we building from ?
dockerfile: Dockerfile.dev # Which docker file to use to build the image
volumes:
- /app/node_modules # Bring this volume to the container
- .:/app # Map "." outside the container as a volume to within the container at "/app" location
command: ["npm", "run", "test"]