Skip to content

chore: Add local-testing Dockerfile and build script for feature branch testing in docker#674

Open
Steve-Mcl wants to merge 2 commits into
mainfrom
docker-local-dev
Open

chore: Add local-testing Dockerfile and build script for feature branch testing in docker#674
Steve-Mcl wants to merge 2 commits into
mainfrom
docker-local-dev

Conversation

@Steve-Mcl

Copy link
Copy Markdown
Contributor

Description

Foreword

During development work for #668 I needed to test changes in docker. I have long had a separate set of changes for doing this but thought it time to finalise them in a PR.

TLDR

Add a sh script that builds your current feature branch as a tagged image to simplify testing changes in docker.

Recorded instructions in docker/build-local.md - we can move this (or point to it) in main README if desired?

Details

This pull request introduces a new workflow for building and testing the device-agent Docker image from local code changes, making it easier to validate feature branches before publishing. The main additions include a local-testing Dockerfile, a helper build script, and documentation explaining the process.

Local development and testing support:

  • Added docker/build-local.md, a guide explaining how to use the new script and Dockerfile for local testing, including instructions for customizing image names and tags.
  • Added docker/Dockerfile.local, a Dockerfile variant that installs the @flowfuse/device-agent package from a locally built tarball instead of npm, enabling local feature branch testing.
  • Added docker/build-local.sh, a script that automates packaging the local code with npm pack, cleans up old tarballs, and builds a Docker image tagged according to the current git branch.

Related Issue(s)

none

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@Steve-Mcl Steve-Mcl requested a review from hardillb June 25, 2026 15:37
@Steve-Mcl Steve-Mcl changed the title Add local-testing Dockerfile and build script for feature branch testing in docker chore: Add local-testing Dockerfile and build script for feature branch testing in docker Jun 25, 2026
@Steve-Mcl

Copy link
Copy Markdown
Contributor Author

FWIW, this was developed and tested on Ubuntu (on WSL)

Likely worth a pull + test on other distro

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.

1 participant