Closed kidmose closed 4 years ago
Dockerfile resolves the issue, if the following commands inserted into Dockerfile in haaukins
directory in your local computer, then pre-configured image can be built.
In Haaukins directory on the local computer;
docker build -t haaukinsdev:latest .
Example Dockerfile
FROM golang:1.11
WORKDIR /go/src/github.com/aau-network-security/haaukins
COPY . .
RUN go get -d -v ./...
Afterwards, image can be accessible.
Thanks :) I'm not (currently) looking into dockerizing - my goal is to have a clean, reproducible install, which i easily get with docker.
This raises a few more specific questions;
COPY
ed in? I guess this is equivalent to git clone ..
?-d
) Then the readme has to be updated in this regard to.haaukins
within golang docker container, hence it is not on readme yet. COPY
, we might say that it is equivalent to git clone ...
however, when cloning a go project the directory where clone will take place should be in proper place.(meaning that GOPATH should have access to that resources)(I think, it is not necessarily correct when the project has go modules )To clarify; In this context, docker is not the issue, nor a goal. I just use docker as an easy way to get a clean environment, where I know stuff is not accidentally working because of a library I installed previously for something completely unrelated (or other hidden side effects..). This helps ensuring that our installation instructions are reproducible. Instead of docker, you can for instance format your machine and do a fresh install of the latest ubuntu, or reset your Mac to factory defaults before testing the install instructions. This is just very painful and time consuming ;) Docker gives me this in one line and in seconds.
So it seems that we have the following fixes to do:
haaukins
is on $GOPATH
, also taking into consideration what the implications of go modules are.-d
from README, as it serves no purpose?-d
on readme, or am I missing something ?Regarding 3: You're right, it's fixed :) (or was never there? :/)
@kidmose, I think, this issue has been resolved with new version(since go-modules is integrated) when you have time could you test out following command (?) as you mentioned above, according to feedback from you, I will close the issue.
docker run -it --rm golang:1.13 /bin/bash -c 'git clone https://github.com/aau-network-security/haaukins.git && cd haaukins && go get ./...'
OR
docker run -it --rm golang:1.13 /bin/bash -c 'git clone https://github.com/aau-network-security/haaukins.git && cd haaukins && go test -v ./...'
Great - thanks :)
Trying to install the project in golang docker container, and otherwise sticking to the readme, I get a somewhat cluttered transcript. If things were good and healthy, I would not expect a bunch of messages about missing packages.
Can any of you guys quickly tell if this is something I'm doing wrong (Then we might need to fix the README) or should we perhaps fix the underlying issue/suppress expected warnings?