0

I have this Flask-app and I want to Dockerize it. Here is the structure of my project:

- experimental-rest-api
-- games (project source code)
-- test
-- docker
---- df-api
------ Dockerfile
---- df-nginx
------ Dockerfile
---- df-postgres
------ Dockerfile
---- df-redis
------ Dockerfile
---- docker-compose.yml
-- requirements.txt
-- run.py

Here is the link to full project: https://github.com/tmpower/experimental-rest-api

I coded most part of the compose and dockerfiles but I run into some problems. The biggest problem is in df-api/Dockerfile. So could someone help me out with the problem. When I try to build that specific dockerfile it could not find requirements.txt.

How should I dockerize it in general. Thanks in advance.

davidism
  • 121,510
  • 29
  • 395
  • 339
Eziz Durdyyev
  • 1,110
  • 2
  • 16
  • 34
  • 1
    Why do you have dockerfiles with only `FROM` instructions? Why not use this image directly? Secondly if this `requirements.txt` is used in `df-api` why not move this file into `df-api` directory? – Michał Krzywański Jul 08 '19 at 13:54
  • 1
    Also look at [this SO question](https://stackoverflow.com/questions/24537340/docker-adding-a-file-from-a-parent-directory/34300129#34300129) – Michał Krzywański Jul 08 '19 at 13:57
  • What's in that Dockerfile that doesn't work? What _is_ the problem? What commands are you running to build your images? – David Maze Jul 08 '19 at 14:36

0 Answers0