-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
tldr;
- The Dockerfile needs to inherit from haskell:8.6.3
- The project name needs to be lowercased in several instances.
Steps to reproduce:
stack new ServantDockerTest servant-docker
sudo docker-compose up
- "ERROR: no such image: ServantDockerTest: invalid reference format: repository name must be lowercase"
I go to docker-compose.yml and change line 3, 5, 15: to servantdockertest
version: '3'
services:
servantdockertest:
build: .
image: servantdockertest
command: ServantDockerTest
expose:
- "1234"
nginx:
build: ./nginx
image: nginx
ports:
- "8080:80"
depends_on:
- servantdockertest
-
The build will fail because of ghc mismatch. To get past this, I update the docker image to haskell:8.6.3 or I have to go into the stack.yaml and change the resolver from lts-13.4 to lts-11.8
-
sudo docker-compose up will still fail because the upstream can't be found. Have to edit the nginx.conf file for the upstream app.
upstream app { server servantdockertest:1234; }
sudo docker-compose build
sudo docker-compose up
And everything works.
Metadata
Metadata
Assignees
Labels
No labels