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

trimetric docker will not start #2

Open
forever-and-a-day opened this issue Jul 14, 2021 · 1 comment
Open

trimetric docker will not start #2

forever-and-a-day opened this issue Jul 14, 2021 · 1 comment

Comments

@forever-and-a-day
Copy link

The following error occurs when attempting to start trimetric:


Building api
Step 1/8 : FROM golang:1.9
 ---> ef89ef5c42a9
Step 2/8 : RUN go get github.com/githubnemo/CompileDaemon
 ---> Using cache
 ---> f99fe34e8ad1
Step 3/8 : RUN go get github.com/lib/pq
 ---> Running in 0d8128d0a62d
# github.com/lib/pq
src/github.com/lib/pq/notify.go:47:2: undefined: driver.Connector
ERROR: Service 'api' failed to build: The command '/bin/sh -c go get github.com/lib/pq' returned a non-zero code: 2

Note that the script was run with root privileges, as dockerd will not start without them.

@zrsmithson
Copy link

pq no longer works with golang:1.9. I got around this by changing to the latest version in Dockerfile-api. I also had a warning for the install trimetric line, so I had to add @latest. I'll submit a PR if it didn't seem to break anything else, otherwise I'll find the right version of pq to link to

# Dockerfile-api
FROM golang:1.17

RUN go get github.com/githubnemo/CompileDaemon
RUN go get github.com/lib/pq

COPY . /go/src/github.com/bsdavidson/trimetric/
RUN go install github.com/bsdavidson/trimetric/cmd/trimetric@latest

VOLUME ["/go/src/github.com/bsdavidson/trimetric"]
EXPOSE 80

CMD [ "/go/bin/trimetric" ]

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

2 participants