Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem building Docker #79

Closed
CorMelse opened this issue Jan 18, 2017 · 6 comments
Closed

Problem building Docker #79

CorMelse opened this issue Jan 18, 2017 · 6 comments

Comments

@CorMelse
Copy link

CorMelse commented Jan 18, 2017

#Hi

I am trying to build a Docker image from the GHC code and am running into some errors I don't understand. Could be my knowledge level, but on advice of Justb4 I would like to ask this community what I am doing wrong, or is it a (known) bug?

I started out with a fresh installed Ubuntu 16.10, followed the installation instructions on the Docker site, created a directory in my home/Ontwikkel directory called "GeoHealthCheck" and installed Git.
Here is a snippet from my history file:

1964 sudo apt-get update
1965 sudo apt-get upgrade
1966 sudo apt-get install apt-transport-https ca-certificates
1967 sudo apt-key adv
--keyserver hkp://ha.pool.sks-keyservers.net:80
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1968 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
1969 sudo apt-get update
1970 sudo apt-cache policy docker-engine
1971 uname -r
1972 sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
1973 sudo apt-get update
1974 sudo apt-get install docker-engine
1975 sudo service docker start
1976 sudo docker run hello-world

1979 cd Ontwikkel/
1980 ll
1981 mkdir GeoHealthCheck
1982 cd
1983 sudo apt install git
1984 git config --global user.email "cor.melse@rivm.nl"
1985 git config --global user.name "Cor Melse"
1986 cd -
1987 git init
1988 git clone https://github.com/geopython/GeoHealthCheck.git
1989 cd GeoHealthCheck/docker/
1990 ll
1991 sudo docker build -t yjacolin/geohealthcheck .

When I tried to build the Docker image with the last command, as described in the read-me the following error appears:

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/melsec/Ontwikkel/GeoHealthCheck/docker/Dockerfile: no such file or directory

the Dockerfile is present within the subdir docker/GeoHealthCheck but this won't work for me mow.
What's my mistake, or what's the bug here?

Thanx for the effort,
Cor

@tomkralidis
Copy link
Member

cc @justb4 / @yjacolin - any suggestions?

@justb4
Copy link
Member

justb4 commented Jan 18, 2017

@CorMelse you have to build one directory deeper, i.e. i.s.o. 1989 cd GeoHealthCheck/docker/ do
cd GeoHealthCheck/docker/GeoHealthCheck where Dockerfile resides, and then sudo docker build -t yjacolin/geohealthcheck. We should update README for that as well.

@yjacolin
Copy link
Collaborator

Please could you send a PR to add "cd docker" in the build section of the README? @justb4 is right

@CorMelse
Copy link
Author

Indeed, this solves my problem!
When editing the README maybe point out that one must "sudo" the commands?

Thanx anyway @justb4 @yjacolin
Cor

@yjacolin
Copy link
Collaborator

the sudo command is not mandatory, it depends if you added yourself in the docker groups (which I did).

justb4 added a commit that referenced this issue Jan 19, 2017
@justb4
Copy link
Member

justb4 commented Jan 19, 2017

Ok, I updated the README, interpreted that @yjacolin replied to my comment above...so @CorMelse : no PR required for now. More info possibly best added to GHC RTD docs, like how to use the Docker-compose stuff...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants