Comments (4)
So currently only the path to the Dockerfile to build is supported. You've defined an object with context
and dockerfile
props.
Try this and let me know if that solves any issues:
version: "3"
networks:
app-tier:
driver: bridge
services:
app:
build: ./.docker/php/Dockerfile
networks:
- app-tier
ports:
- 9002:9000
volumes:
- .:/srv/app
nginx:
build: ./.docker/nginx/Dockerfile
networks:
- app-tier
ports:
- 8080:80
volumes:
- ./public:/srv/app/public
from now-compose.
If I remove the context, I got error from docker-compose script.
Full error message:
Creating network "now_app-tier" with driver "bridge"
Building app
Traceback (most recent call last):
File "docker-compose", line 6, in <module>
File "compose/cli/main.py", line 71, in main
File "compose/cli/main.py", line 127, in perform_command
File "compose/cli/main.py", line 1052, in up
File "compose/cli/main.py", line 1048, in up
File "compose/project.py", line 471, in up
File "compose/service.py", line 352, in ensure_image_exists
File "compose/service.py", line 1067, in build
File "site-packages/docker/api/build.py", line 142, in build
TypeError: You must specify a directory to build in path
[30179] Failed to execute script docker-compose
ERROR: 255
from now-compose.
Do you mind giving me more info so i can help you out?
What does the directory structure look like for your project?
Also feel free to take a look at the example proj and directory structure for a working example.
from now-compose.
Thanks Dan, the project is actually here if you want to take a look:
https://github.com/vincentwongso/slim-docker
It's PHP micro-framework (SLIM) project with NGINX and PHP 7.2
from now-compose.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from now-compose.