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

Fix: use golang:alpine as base and re-enable CGO for revad #1797

Merged
merged 2 commits into from
Jun 22, 2021

Conversation

SamuAlfageme
Copy link
Contributor

No description provided.

…' image (cs3org#1766)"

This partially reverts commit 07adb3f as there are a few issues
when trying to run revad e.g. go-sqlite3 requires it:

2021-06-15 15:39:31.314 ERR go/src/github/cs3org/reva/cmd/revad/runtime/runtime.go:197 > error starting the http server error="http service dataprovider could not be started,: localfs: error initializing db: localfs: error preparing statement: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub" pid=1
@michielbdejong
Copy link
Contributor

michielbdejong commented Jun 16, 2021

I got an error standard_init_linux.go:219: exec user process caused: no such file or directory while trying this for the first time. Will investigate where that could have come from, because it doesn't seem related to the change, I think.

Ah wait that is the same error as in #1765. Does this PR aim to fix #1765, actually?

@SamuAlfageme
Copy link
Contributor Author

@michielbdejong how were you starting the revad container? #1765 should have been fixed with #1766 for the reva cli client.

This PR replaces scratch with golang/alpine as base for running the revad binary, since as @IljaN pointed out in #1766 (comment), we're not able to disable CGO for some dependencies. e.g.

2021-06-15 15:39:31.314 ERR go/src/github/cs3org/reva/cmd/revad/runtime/runtime.go:197 > 
  error starting the http server error=
    "http service dataprovider could not be started,: localfs: 
      error initializing db: localfs: 
      error preparing statement: 
        Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. 
        This is a stub" 
  pid=1

michielbdejong added a commit to pondersource/sciencemesh-php that referenced this pull request Jun 16, 2021
@michielbdejong
Copy link
Contributor

@SamuAlfageme thanks, I'll have a look!

@michielbdejong
Copy link
Contributor

OK, it's working for me too now. I was getting that error because I was using ubuntu as the runtime image for revad. I switched to golang:alpine now and that works! All good! 👍

@SamuAlfageme SamuAlfageme mentioned this pull request Jun 21, 2021
@labkode labkode merged commit 0a0f6c2 into cs3org:master Jun 22, 2021
labkode referenced this pull request Jun 22, 2021
…1766)

* Build static binaries for Docker, so that we can use the 'stratch' image.
* add changelog entry
@SamuAlfageme SamuAlfageme deleted the docker_fix_base_cgo branch March 10, 2023 18:28
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

Successfully merging this pull request may close these issues.

3 participants