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

docker build error #4

Closed
greinet opened this issue Dec 9, 2019 · 3 comments
Closed

docker build error #4

greinet opened this issue Dec 9, 2019 · 3 comments

Comments

@greinet
Copy link

greinet commented Dec 9, 2019

Error witht docker build:

Step 7/10 : RUN go install
---> Running in 85542327d4eb
launcher.go:16:2: cannot find package "github.com/cheikhshift/gos/core" in any of:
/usr/local/go/src/github.com/cheikhshift/gos/core (from $GOROOT)
/go/src/github.com/cheikhshift/gos/core (from $GOPATH)
server_out.go:17:2: cannot find package "github.com/elazarl/go-bindata-assetfs" in any of:
/usr/local/go/src/github.com/elazarl/go-bindata-assetfs (from $GOROOT)
/go/src/github.com/elazarl/go-bindata-assetfs (from $GOPATH)
launcher.go:17:2: cannot find package "github.com/fatih/color" in any of:
/usr/local/go/src/github.com/fatih/color (from $GOROOT)
/go/src/github.com/fatih/color (from $GOPATH)
server_out.go:18:2: cannot find package "github.com/gorilla/sessions" in any of:
/usr/local/go/src/github.com/gorilla/sessions (from $GOROOT)
/go/src/github.com/gorilla/sessions (from $GOPATH)
server_out.go:6:2: cannot find package "github.com/thestrukture/IDE/api/assets" in any of:
/usr/local/go/src/github.com/thestrukture/IDE/api/assets (from $GOROOT)
/go/src/github.com/thestrukture/IDE/api/assets (from $GOPATH)
launcher.go:6:2: cannot find package "github.com/thestrukture/IDE/api/globals" in any of:
/usr/local/go/src/github.com/thestrukture/IDE/api/globals (from $GOROOT)
/go/src/github.com/thestrukture/IDE/api/globals (from $GOPATH)
server_out.go:7:2: cannot find package "github.com/thestrukture/IDE/api/handlers" in any of:
/usr/local/go/src/github.com/thestrukture/IDE/api/handlers (from $GOROOT)
/go/src/github.com/thestrukture/IDE/api/handlers (from $GOPATH)
launcher.go:7:2: cannot find package "github.com/thestrukture/IDE/api/methods" in any of:
/usr/local/go/src/github.com/thestrukture/IDE/api/methods (from $GOROOT)
/go/src/github.com/thestrukture/IDE/api/methods (from $GOPATH)
server_out.go:8:2: cannot find package "github.com/thestrukture/IDE/api/sessions" in any of:
/usr/local/go/src/github.com/thestrukture/IDE/api/sessions (from $GOROOT)
/go/src/github.com/thestrukture/IDE/api/sessions (from $GOPATH)
launcher.go:8:2: cannot find package "github.com/thestrukture/IDE/types" in any of:
/usr/local/go/src/github.com/thestrukture/IDE/types (from $GOROOT)
/go/src/github.com/thestrukture/IDE/types (from $GOPATH)
The command '/bin/sh -c go install' returned a non-zero code: 1

@cheikhshift
Copy link
Member

@greinet can you specify the Go version used with this build?

@harenber
Copy link

harenber commented Apr 3, 2022

@greinet was refering to the Dockerfile in your repo, which is using Go 1.8 where the problem exists.

Furthermore, the CMD command is wrong.

Here is a small patch to get your Dockerfile to build and run successfully:

diff --git a/Dockerfile b/Dockerfile
index 917c7fd..d06a820 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.8
+FROM golang:1.17.6
 ENV WEBAPP /go/src/server
 RUN mkdir -p ${WEBAPP}
 COPY . ${WEBAPP}
@@ -7,4 +7,4 @@ WORKDIR ${WEBAPP}
 RUN go install
 RUN rm -rf ${WEBAPP} 
 EXPOSE 8884
-CMD server
+CMD IDE

Maybe it would be a good idea to add a VOLUME to actually store the projects.

HTH.

@cheikhshift
Copy link
Member

Hey, thank you for the insight. I've been very busy lately. I'll get to this soon. Feel free to also submit a pull request to fix this.

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

3 participants