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

/-/versions for official Docker image returns wrong Datasette version #399

Closed
simonw opened this issue Jan 11, 2019 · 2 comments
Closed
Labels
bug minor Minor bugs (not high priority)

Comments

@simonw
Copy link
Owner

simonw commented Jan 11, 2019

docker run -p 8001:8001 datasetteproject/datasette datasette -p 8001 -h 0.0.0.0

http://0.0.0.0:8001/-/versions returns this:

{
    "datasette": {
        "version": "0+unknown"
    },
    ...

This is because the Docker image is built by copying in the Datasette source code, which confuses versioneer. Maybe the Docker image should install the code using a wheel or similar?

@simonw simonw added bug minor Minor bugs (not high priority) labels Jan 11, 2019
@simonw
Copy link
Owner Author

simonw commented Jan 13, 2019

It looks like there are two reasons for this:

  • The .git directory was listed in .dockerignore so it wasn't being copied into the build process
  • The docker build stage wasn't installing the git executable, so it couldn't read the current version

@simonw simonw closed this as completed in a418c8b Jan 13, 2019
@simonw
Copy link
Owner Author

simonw commented Jan 13, 2019

docker pull datasetteproject/datasette
docker run -p 8001:8001 datasetteproject/datasette datasette -p 8001 -h 0.0.0.0

http://0.0.0.0:8001/-/versions now returns:

{
    "datasette": {
        "version": "0.26.2+0.ga418c8b.dirty"
    },

I'm not sure why it's showing .dirty there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug minor Minor bugs (not high priority)
Projects
None yet
Development

No branches or pull requests

1 participant