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

The RUN make build step fails in docker #48

Open
AbdulrhmnGhanem opened this issue Jun 19, 2022 · 3 comments
Open

The RUN make build step fails in docker #48

AbdulrhmnGhanem opened this issue Jun 19, 2022 · 3 comments

Comments

@AbdulrhmnGhanem
Copy link
Member

After pulling the latest updates in https://github.com/kitspace/gitea/tree/rebase-4, the RUN make build step fails with the error

no rule to make target 'modules/public/bindata.go', needed by 'gitea'. stop.

This isn't the case if I run make TAGS="bindata sqlite sqlite_unlock_notify" make build locally.
It also fails when builidng with the original docker file Dockerfile. Though cloning go-gitea/gitea and running docker build doesn't cause this error.

The output of git diff --name-only HEAD upstream/main is shown below, I am not sure what changes can cause this error.

.github/ISSUE_TEMPLATE/bug-report.yaml
.github/ISSUE_TEMPLATE/config.yml
.github/ISSUE_TEMPLATE/feature-request.yaml
.github/ISSUE_TEMPLATE/ui.bug-report.yaml
.github/workflows/sync-fork.yml
Dockerfile
Dockerfile.gitea.dev
routers/api/v1/api.go
routers/api/v1/repo/migrate.go
routers/web/auth/kitspace_auth.go
routers/web/repo/editor.go
routers/web/repo/migrate.go
routers/web/web.go
services/task/task.go
@AbdulrhmnGhanem AbdulrhmnGhanem changed the title The make step fails in docker The RUN make build step fails in docker Jun 19, 2022
@AbdulrhmnGhanem
Copy link
Member Author

AbdulrhmnGhanem commented Jun 19, 2022

git fetch upstream && git checkout upstream/main && docker build . -t my_tag output 👇

error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.
Running go generate...
go: downloading github.com/mattn/go-sqlite3 v1.14.12
make: *** No rule to make target 'modules/public/bindata.go', needed by 'gitea'.  Stop.

git clone https://github.com/go-gitea/gitea && cd gitea && docker build . -t tag builds the image successfully!
Even git clone https://github.com/kitspace/gitea && cd gitea && docker build . -t tag builds it!

@kasbah, could you reproduce the error in the first command?

@kasbah
Copy link
Member

kasbah commented Jun 19, 2022

git fetch upstream && git checkout upstream/main && docker build . -t my_tag 

fails with the same error for me. i didn't checkout the rebase-4 branch before.

@AbdulrhmnGhanem
Copy link
Member Author

I managed to reproduce the error apart from our changes

mkdir test
cd test
git init .
git submodule add https://github.com/go-gitea/gitea
cd gitea
docker build . -t tag

output 👇

error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.
Running go generate...
go: downloading github.com/mattn/go-sqlite3 v1.14.12
make: *** No rule to make target 'modules/public/bindata.go', needed by 'gitea'.  Stop.
The command '/bin/sh -c if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi  && make clean-all build' returned a non-zero code: 2

A wild guess is that this is a bug in Golang itself; it doesn't handle submodules properly.

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