Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dokku-based Dockerfile build fails on .git/objects directory concerns #3614

Closed
drauschenbach opened this issue Jan 20, 2017 · 5 comments
Closed
Labels
kind/bug A bug in existing code (including security flaws) topic/containers + vms

Comments

@drauschenbach
Copy link

Although a local Docker build of v0.4.4 works, a remote Dokku-based buildstep-based build fails with:

Step 14 : RUN apk add --update musl-dev gcc go git bash wget ca-certificates 	&& mkdir -p $IPFS_PATH 	&& adduser -D -h $IPFS_PATH -u 1000 ipfs 	&& chown ipfs:ipfs $IPFS_PATH && chmod 755 $IPFS_PATH 	&& go get -u github.com/whyrusleeping/gx 	&& go get -u github.com/whyrusleeping/gx-go 	&& ([ -z "$GX_IPFS" ] || echo $GX_IPFS > $IPFS_PATH/api) 	&& cd $SRC_PATH&& gx --verbose install --global 	&& mkdir .git/objects && commit=$(git rev-parse --short HEAD) 	&& echo "ldflags=-X github.com/ipfs/go-ipfs/repo/config.CurrentCommit=$commit" 	&& cd $SRC_PATH/cmd/ipfs 	&& go build -ldflags "-X github.com/ipfs/go-ipfs/repo/config.CurrentCommit=$commit" 	&& cp ipfs /usr/local/bin/ipfs 	&& cp $SRC_PATH/bin/container_daemon /usr/local/bin/start_ipfs 	&& chmod 755 /usr/local/bin/start_ipfs 	&& apk del --purge musl-dev gcc go git && rm -rf $GOPATH && rm -vf $IPFS_PATH/api
 ---> Running in f83eda465ab2
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
(1/28) Upgrading musl (1.1.15-r5 -> 1.1.16-r2)
...
installation of dep go-ipfs complete!
mkdir: can't create directory '.git/objects': No such file or directory
remote: The command '/bin/sh -c apk add --update musl-dev gcc go git bash wget ca-certificates 	&& mkdir -p $IPFS_PATH 	&& adduser -D -h $IPFS_PATH -u 1000 ipfs 	&& chown ipfs:ipfs $IPFS_PATH && chmod 755 $IPFS_PATH 	&& go get -u github.com/whyrusleeping/gx 	&& go get -u github.com/whyrusleeping/gx-go 	&& ([ -z "$GX_IPFS" ] || echo $GX_IPFS > $IPFS_PATH/api) 	&& cd $SRC_PATH 	&& gx --verbose install --global 	&& mkdir .git/objects && commit=$(git rev-parse --short HEAD) 	&& echo "ldflags=-X github.com/ipfs/go-ipfs/repo/config.CurrentCommit=$commit" 	&& cd $SRC_PATH/cmd/ipfs 	&& go build -ldflags "-X github.com/ipfs/go-ipfs/repo/config.CurrentCommit=$commit" 	&& cp ipfs /usr/local/bin/ipfs 	&& cp $SRC_PATH/bin/container_daemon /usr/local/bin/start_ipfs 	&& chmod 755 /usr/local/bin/start_ipfs 	&& apk del --purge musl-dev gcc go git && rm -rf $GOPATH && rm -vf $IPFS_PATH/api' returned a non-zero code: 1
@ghost ghost added kind/bug A bug in existing code (including security flaws) topic/containers + vms labels Jan 21, 2017
@whyrusleeping
Copy link
Member

@Kubuxu did you fix this recently? I remember merging a dockerfile PR that touched .git/objects

@Kubuxu
Copy link
Member

Kubuxu commented Feb 20, 2017

This is something different, I added the same mkdir to dockerfile used by Jenkins. I have no idea why it fails in dokku.

@ghost
Copy link

ghost commented Feb 20, 2017

It probably just needs to be mkdir -p instead of mkdir

@Kubuxu
Copy link
Member

Kubuxu commented Feb 20, 2017

But this would mean that there is no .git directory over there.

@Kubuxu
Copy link
Member

Kubuxu commented Apr 5, 2019

I could not reproduce it and we changed our Dockerfiles few times.

@Kubuxu Kubuxu closed this as completed Apr 5, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/containers + vms
Projects
None yet
Development

No branches or pull requests

3 participants