Skip to content

feat: Docker support#333

Open
gao-artur wants to merge 10 commits into
tekumara:mainfrom
gao-artur:docker-support
Open

feat: Docker support#333
gao-artur wants to merge 10 commits into
tekumara:mainfrom
gao-artur:docker-support

Conversation

@gao-artur
Copy link
Copy Markdown
Contributor

@gao-artur gao-artur commented May 26, 2026

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 fakesnow server.
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.

@gao-artur gao-artur changed the title Docker support feat: Docker support May 26, 2026
Comment thread Dockerfile

EXPOSE 8080

CMD ["fakesnow", "-s", "--host", "0.0.0.0", "--port", "8080"]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the easy part :-) what is really needed is a workflow to publish this to ghcr

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll check how to do that and will update the PR. Hopefully today or tomorrow.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, why ghcr and not dockerhub? I think the latter is more convenient for OSS projects

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ghcr is friendlier to users because it doesn't have pull rate limits like dockerhub does

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm wrong and public images don't require authentication. Checking.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Updated the publish to ghcr.io/tekumara/fakesnow

yield container


def test_docker_select(docker_fakesnow: DockerContainer) -> None:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Comment thread .github/workflows/release.yml Outdated
images: tekumara/fakesnow
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable=${{ !github.event.release.prerelease }}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest tag is not added to a prerelease versions

Comment thread README.md Outdated
Comment thread .github/workflows/release.yml Outdated
Co-authored-by: Artur Gordashnikov <gao.artur@gmail.com>
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.

FR: publish docker image

2 participants