Closed greinet closed 2 years ago
@greinet can you specify the Go version used with this build?
@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.
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.
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