Open adaschevici opened 4 years ago
The image built on DockerHub works, but i am not sure what I missed while building it locally, shouldn't it just work?
I recently had to make incompatible changes to the go interpreter, with corresponding changes to gophernotes - thus you cannot just mix arbitrary versions: each go.mod
contains the correct dependencies.
Actually, the main issue is
/usr/lib/go/src/internal/reflectlite/value.go:8:2: found packages runtime (alg.go) and trace (annotation.go) in /usr/lib/go/src/runtime
which points to the possible reason:
maybe a new version of Go toolchain was installed in /usr/lib/go
on top of an older one, without removing the latter first?
Perhaps I did not fully understand what you mean.
What i did:
1) cloned the repo
2) ran docker build .
and docker build --file Dockerfile.DS
Regarding having an earlier go version:
I inserted RUN go -version
prior to the command and it looked like go isn't installed
Yes, the docker builds create an environment from scratch.
What I meant is that maybe the Dockerfile.DS
somehow manages to install Go toolchain twice in the same location, which causes the error you reported
what i can make out from the Dockerfile is this line adding go
&& apk --update-cache --allow-untrusted \
--repository http://dl-4.alpinelinux.org/alpine/edge/community \
--arch=x86_64 add \
go \
but i can't tell if the following lines are adding go, they don't seem to be adding another toolchain
I can't tell either... not a Docker expert at all. Maybe @SpencerPark can help?
Using Alpine 3.10 should work fine with its latest version of Go (1.14.3-r1).
Please update the Dockerfile.DS with the following codes:
@Line 1
FROM alpine:3.10
@Line 12, 13
--repository http://dl-4.alpinelinux.org/alpine/v3.10/community \
--repository http://dl-4.alpinelinux.org/alpine/v3.10/main \
@Line 25, 26
&& pip3 install --upgrade pip==19.2.3 \
&& ln -s /usr/bin/python3.7 /usr/bin/python \
@Line 36
&& pip3 install jupyter notebook pyzmq tornado ipykernel \
@Line 67
&& find /usr/lib/python3.7 -name __pycache__ | xargs rm -r \
Build the docker image
docker build --tag test:nb --file Dockerfile.DS .
You could just refer to my revised Dockerfile.DS: Dockerfile.txt
awesome, thanks @cigoic that worked
I have tried to build the Docker image locally both using Dockerfile and Dockerfile.DS but it seems to fail.
The build of gophernotes is failing on the go build command. I tried changing the go interpreter to a previous version but got this:
without changing anything the error I am getting is this:
Tried building the image using docker on OSX and ubuntu.