feat: Docker support#333
Conversation
|
|
||
| EXPOSE 8080 | ||
|
|
||
| CMD ["fakesnow", "-s", "--host", "0.0.0.0", "--port", "8080"] |
There was a problem hiding this comment.
this is the easy part :-) what is really needed is a workflow to publish this to ghcr
There was a problem hiding this comment.
Sure, I'll check how to do that and will update the PR. Hopefully today or tomorrow.
There was a problem hiding this comment.
Btw, why ghcr and not dockerhub? I think the latter is more convenient for OSS projects
There was a problem hiding this comment.
ghcr is friendlier to users because it doesn't have pull rate limits like dockerhub does
There was a problem hiding this comment.
But it requires authentication to docker pull. IMO not the best dev experience. Also, the rate limit is only important for CI, local dev will probably never hit the rate limit. And authenticating with a free account in CI doubles the rate limit: from 100 requests per 6 hours for anonymous pulls to 200 requests per 6 hours for authenticated pulls. Of course, if you don't agree, I'll change it to ghcr.
There was a problem hiding this comment.
Maybe I'm wrong and public images don't require authentication. Checking.
There was a problem hiding this comment.
Done. Updated the publish to ghcr.io/tekumara/fakesnow
| yield container | ||
|
|
||
|
|
||
| def test_docker_select(docker_fakesnow: DockerContainer) -> None: |
There was a problem hiding this comment.
i'd prefer to keep the unit tests quick and free of external dependencies (like having a running docker daemon) ... .. although something like this could be part of the docker build pipeline and use the snowflake cli to smoke test the image
There was a problem hiding this comment.
I moved this test to integration_tests folder and ran it on publish-docker action. If this pattern sounds correct, should the tests folder be renamed to unit_tests for consistency?
commit e9162d2 Author: Artur Gordashnikov <gao.artur@gmail.com> Date: Sat May 30 13:06:26 2026 +0300 revert publish test setup commit 67cd988 Author: Artur Gordashnikov <gao.artur@gmail.com> Date: Sat May 30 12:55:50 2026 +0300 prerelease commit 1fe6fe3 Author: Artur Gordashnikov <gao.artur@gmail.com> Date: Sat May 30 12:46:04 2026 +0300 update commit af9fb20 Author: Artur Gordashnikov <gao.artur@gmail.com> Date: Sat May 30 12:42:25 2026 +0300 update commit 11f481f Author: Artur Gordashnikov <gao.artur@gmail.com> Date: Sat May 30 12:30:01 2026 +0300 docker release
| images: tekumara/fakesnow | ||
| tags: | | ||
| type=semver,pattern={{version}} | ||
| type=raw,value=latest,enable=${{ !github.event.release.prerelease }} |
There was a problem hiding this comment.
The latest tag is not added to a prerelease versions
Co-authored-by: Artur Gordashnikov <gao.artur@gmail.com>
Fix #201
Hey. I added a Dockefile to the project and updated the README file. I assumed the image would be published under
ghcr.io/tekumara/fakesnow, but let me know if you prefer another name.Also added an integration test using testcontainers, which builds the Docker image, starts the container, and runs a simple query to ensure the server starts and runs the
fakesnowserver.I also built and started the container locally and ran my .NET test suite, so I can confirm that everything is fine.
Disclaimer: I have zero knowledge of Python. The code was written by Copilot, but not in autopilot mode.