Skip to content

Add support for building Docker images (locally and in GitHub Actions) - #10

Merged
cap10morgan merged 7 commits into
mainfrom
feat/docker-image
Feb 20, 2026
Merged

cap10morgan merged 7 commits into
mainfrom
feat/docker-image

Conversation

@cap10morgan

@cap10morgan cap10morgan commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor

One change that I'm sort of subtly proposing in here is that we do not set a default HDB_ADMIN_PASSWORD but instead require (and will document) that users set that when they run the container via e.g. -e HDB_ADMIN_PASSWORD=whatever. This is a pretty common security practice with Docker containers.

@cap10morgan
cap10morgan marked this pull request as ready for review February 20, 2026 18:24
@cap10morgan
cap10morgan requested review from a team as code owners February 20, 2026 18:24
Comment thread Dockerfile Outdated
ENV TC_AGREEMENT=yes
ENV NETWORK_OPERATIONSAPI_PORT=9925
ENV LOGGING_STDSTREAMS=true
ENV REPLICATION_HOSTNAME=localhost

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will still work but i think with v5 we are moving over to NODE_HOSTNAME

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we still support replication.hostname though. I think.

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.

Updated in 9ebcf42

@kriszyp kriszyp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank for getting this up!

Comment thread Dockerfile Outdated
ENV TC_AGREEMENT=yes
ENV NETWORK_OPERATIONSAPI_PORT=9925
ENV LOGGING_STDSTREAMS=true
ENV REPLICATION_HOSTNAME=localhost

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we still support replication.hostname though. I think.

Comment thread Dockerfile Outdated

WORKDIR /home/harper

USER harper

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Based on https://harperdb.slack.com/archives/C3Z2T1QAZ/p1771516627918229?thread_ts=1771508030.217909&cid=C3Z2T1QAZ, I thought we had decided not to make the user name change yet (stay with harperdb), due to more complicated fabric changes?

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.

Haha, I drew the exact opposite conclusion from (trying to) read that same thread. Happy to revert though if it makes Fabric devops' lives easier in the short term!

Comment thread .dockerignore
@@ -0,0 +1,9 @@
.git/
/dist/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't want dist and node_modules in the docker image? I am probably misunderstanding.

@cap10morgan cap10morgan Feb 20, 2026 •

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.

They get created inside the image via the npm run package call in the Dockerfile. We don't want whatever versions of those might be hanging around on whatever machine is running the build.

@cb1kenobi cb1kenobi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks awesome! I love the slack message on success/failure. I'd like to borrow it. :)

I also learned about the RUN <<-EOF syntax. I'm old school and used to the && chaining.

token: ${{ secrets.SLACK_BOT_KEY }}
payload: |
{
"channel": "#development-ci",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FWIW, for rocksdb-js, I put the channel id in a GH secret since that repo is public. Not sure if we want to do the same, but this should do the trick:

Suggested change
"channel": "#development-ci",
"channel": "${{ secrets. SLACK_CI_CHANNEL_ID }}",

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.

Does the channel name need to be kept secret? You need credentials to access it either way. So I was assuming it did not.

@kriszyp kriszyp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume you will make the user name change, but this looks great!

@cap10morgan
cap10morgan merged commit 508c63b into main Feb 20, 2026
20 of 23 checks passed
@cap10morgan
cap10morgan deleted the feat/docker-image branch February 20, 2026 20:36
kriszyp added a commit that referenced this pull request Jun 24, 2026
Add DESIGN.md invariant #10 capturing the three reconnect-recovery drivers
(close-handler/forceReconnect retry, receive watchdog, main-thread wedge
reconcile), the createWebSocket-rejection trap they all shared, and the two
backstop subtleties (never-opened entry uses connected!==true + createdAt; the
reconcile must forceReconnect only a reused connection on a per-db wedged entry).
Hard-won recovery-layering knowledge that wasn't previously captured.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kriszyp added a commit that referenced this pull request Jun 24, 2026
Add DESIGN.md invariant #10 capturing the three reconnect-recovery drivers
(close-handler/forceReconnect retry, receive watchdog, main-thread wedge
reconcile), the createWebSocket-rejection trap they all shared, and the two
backstop subtleties (never-opened entry uses connected!==true + createdAt; the
reconcile must forceReconnect only a reused connection on a per-db wedged entry).
Hard-won recovery-layering knowledge that wasn't previously captured.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.

4 participants