[{"data":1,"prerenderedAt":674},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcontribute\u002Fcreating-debug-stack-containers\u002F":3,"docs-nav":216},{"id":4,"title":5,"body":6,"description":12,"extension":204,"layout":205,"meta":206,"navGroup":205,"navGroupOrder":205,"navOrder":205,"navTitle":207,"navigation":208,"originalPath":209,"path":210,"redirect":205,"seo":211,"stem":212,"updated":213,"version":214,"__hash__":215},"docs\u002Fdocs\u002Fcontribute\u002Fcreating-debug-stack-containers.md","Creating Debug Stack Containers",{"type":7,"value":8,"toc":196},"minimark",[9,13,21,24,27,37,42,53,64,67,77,80,86,93,96,117,124,135,141,144,150,154,166,169,173,176,182,189,193],[10,11,12],"p",{},"Sometimes we want to be able to run some debug code within a stack running in our\nstaging test environment.",[10,14,15,16,20],{},"For example, changes to the ",[17,18,19],"code",{},"nr-launcher"," component or any of the other components\nthat run within the stack.",[10,22,23],{},"This guide shows a simple way to do that without having to rebuild the container\nfrom scratch each time.",[10,25,26],{},"This will require:",[28,29,30,34],"ol",{},[31,32,33],"li",{},"Docker",[31,35,36],{},"A container registry you can push images to. For example, a free DockerHub account where you can push images",[38,39,41],"h3",{"id":40},"creating-a-debug-container","Creating a debug container",[10,43,44,45,48,49,52],{},"Pick an existing container image to use as your starting point. For example, ",[17,46,47],{},"flowfuse\u002Fnode-red:2.5.0-4.0.x","\ncontains ",[17,50,51],{},"nr-launcher@2.5.0"," and the latest Node-RED 4.x release.",[10,54,55,59,60,63],{},[56,57,58],"strong",{},"Note",": our staging environments requires ",[17,61,62],{},"arm64"," based containers. The following instructions work for\nMacs (with M1\u002FM2) - additional steps may be needed for other OS; please contribute them if you know them.",[10,65,66],{},"Use the following command to open a shell into the container:",[68,69,74],"pre",{"className":70,"code":72,"language":73},[71],"language-text","docker run -it --entrypoint \u002Fbin\u002Fbash flowfuse\u002Fnode-red:2.5.0-4.0.x\n","text",[17,75,72],{"__ignoreMap":76},"",[10,78,79],{},"The prompt will then look like this:",[68,81,84],{"className":82,"code":83,"language":73},[71],"e8dcd669ea4c:\u002Fusr\u002Fsrc\u002Fflowforge-nr-launcher$\n",[17,85,83],{"__ignoreMap":76},[10,87,88,89,92],{},"Take a note of the ",[17,90,91],{},"e8dcd669ea4c"," - this is the id of the container instance you have created.",[10,94,95],{},"The following directories are probably of interest:",[97,98,99,108],"ul",{},[31,100,101,104,105,107],{},[17,102,103],{},"\u002Fusr\u002Fsrc\u002Fflowforge-nr-launcher"," - contains the ",[17,106,19],{}," code and its dependencies",[31,109,110,104,113,116],{},[17,111,112],{},"\u002Fusr\u002Fsrc\u002Fnode-red",[17,114,115],{},"node-red"," code",[10,118,119,120,123],{},"Using ",[17,121,122],{},"vi",", you can edit the files to make the changes you want and when you're done, exit the shell.",[10,125,126,127,130,131,134],{},"Having made the changes, use ",[17,128,129],{},"docker commit"," to create a new container image. The command requires\nthe id of the container you've just edited and the tag for the container. It also needs to restore\nthe ",[17,132,133],{},"entrypoint"," configuration back to the default.",[68,136,139],{"className":137,"code":138,"language":73},[71],"docker commit \\\n  --change='ENTRYPOINT [\".\u002Fnode_modules\u002F.bin\u002Fflowfuse-node-red\", \"-p\", \"2880\", \"-n\", \"\u002Fusr\u002Fsrc\u002Fnode-red\"]' \\\n  e8dcd669ea4c \\\n  knolleary\u002Fff-debug:debug-1\n",[17,140,138],{"__ignoreMap":76},[10,142,143],{},"Finally, you can push the new container to your container registry.",[68,145,148],{"className":146,"code":147,"language":73},[71],"docker push knolleary\u002Fff-debug:debug-1\n",[17,149,147],{"__ignoreMap":76},[38,151,153],{"id":152},"using-the-container-in-flowfuse","Using the container in FlowFuse",[10,155,156,157,161,162,165],{},"Debug containers should ",[158,159,160],"em",{},"only"," be used in pre-staging\u002Fstaging environments. Do ",[158,163,164],{},"not"," add to production.",[10,167,168],{},"Once pushed, you can create a custom stack in the FlowFuse admin section and give it the location\nof your container.",[38,170,172],{"id":171},"iterating","Iterating",[10,174,175],{},"If you find you want to add some more debug, repeat the process, however use your existing image\nas the starting point:",[68,177,180],{"className":178,"code":179,"language":73},[71],"docker run -it --entrypoint \u002Fbin\u002Fbash knolleary\u002Fff-debug:debug-1\n",[17,181,179],{"__ignoreMap":76},[10,183,184,185,188],{},"Be sure to increment the number in the image name (",[17,186,187],{},"debug-2",") when you commit and push the new container.",[38,190,192],{"id":191},"tidying-up","Tidying up",[10,194,195],{},"Remember to delete your instances\u002Fstacks once you're done, as well as all of the local\ndocker images and containers that have been created along the way.",{"title":76,"searchDepth":197,"depth":197,"links":198},4,[199,201,202,203],{"id":40,"depth":200,"text":41},3,{"id":152,"depth":200,"text":153},{"id":171,"depth":200,"text":172},{"id":191,"depth":200,"text":192},"md",null,{},"Creating debug stack containers",true,"contribute\u002Fcreating-debug-stack-containers.md","\u002Fdocs\u002Fcontribute\u002Fcreating-debug-stack-containers",{"description":12},"docs\u002Fcontribute\u002Fcreating-debug-stack-containers","2024-07-19 20:33:52 +0530","2.33.2","dlnTPGT3hl33KL24ZW80Hat76gCB2dmOckc4hjiH764",[217,226,245,257],{"name":218,"order":219,"children":220},"FlowFuse User Manuals",1,[221],{"title":222,"path":223,"group":218,"groupOrder":219,"order":224,"children":225},"FlowFuse API","\u002Fdocs\u002Fapi",2,[],{"name":227,"order":197,"children":228},"FlowFuse Self-Hosted",[229,233],{"title":230,"path":231,"group":227,"groupOrder":197,"order":219,"children":232},"Quick Start","\u002Fdocs\u002Fquick-start",[],{"title":234,"path":235,"group":227,"groupOrder":197,"order":200,"children":236},"Upgrading FlowFuse","\u002Fdocs\u002Fupgrade",[237,241],{"title":238,"path":239,"order":205,"children":240},"Installing a license","\u002Fdocs\u002Fupgrade\u002Fopen-source-to-premium",[],{"title":242,"path":243,"order":205,"children":244},"Upgrading the Node-RED version","\u002Fdocs\u002Fupgrade\u002Fnodered-version",[],{"name":246,"order":247,"children":248},"Support",5,[249,253],{"title":250,"path":251,"group":246,"groupOrder":247,"order":200,"children":252},"Premium Support","\u002Fdocs\u002Fpremium-support",[],{"title":254,"path":255,"group":246,"groupOrder":247,"order":205,"children":256},"Debugging Node-RED issues","\u002Fdocs\u002Fdebugging",[],{"name":258,"order":205,"children":259},"Other",[260,308,320,397,446,465,539,550],{"title":261,"path":262,"order":205,"children":263},"admin","\u002Fdocs\u002Fadmin",[264,268,280,288,292,296,300,304],{"title":265,"path":266,"order":219,"children":267},"Administering FlowFuse","\u002Fdocs\u002Fadmin\u002Fintroduction",[],{"title":269,"path":270,"order":205,"children":271},"Configuring Single Sign-On (SSO)","\u002Fdocs\u002Fadmin\u002Fsso",[272,276],{"title":273,"path":274,"order":205,"children":275},"LDAP SSO","\u002Fdocs\u002Fadmin\u002Fsso\u002Fldap",[],{"title":277,"path":278,"order":205,"children":279},"SAML SSO","\u002Fdocs\u002Fadmin\u002Fsso\u002Fsaml",[],{"title":281,"path":282,"order":205,"children":283},"hardening","\u002Fdocs\u002Fadmin\u002Fhardening",[284],{"title":285,"path":286,"order":205,"children":287},"Kubernetes Hardening","\u002Fdocs\u002Fadmin\u002Fhardening\u002Fkubernetes",[],{"title":289,"path":290,"order":205,"children":291},"Monitoring","\u002Fdocs\u002Fadmin\u002Fmonitoring",[],{"title":293,"path":294,"order":205,"children":295},"Observability","\u002Fdocs\u002Fadmin\u002Fobservability",[],{"title":297,"path":298,"order":205,"children":299},"Soft Launch Enablement","\u002Fdocs\u002Fadmin\u002Ffeature-flags",[],{"title":301,"path":302,"order":205,"children":303},"Telemetry","\u002Fdocs\u002Fadmin\u002Ftelemetry",[],{"title":305,"path":306,"order":205,"children":307},"User Management","\u002Fdocs\u002Fadmin\u002Fuser-management",[],{"title":309,"path":310,"order":205,"children":311},"cloud","\u002Fdocs\u002Fcloud",[312,316],{"title":313,"path":314,"order":219,"children":315},"Introduction","\u002Fdocs\u002Fcloud\u002Fintroduction",[],{"title":317,"path":318,"order":205,"children":319},"FlowFuse Cloud Billing","\u002Fdocs\u002Fcloud\u002Fbilling",[],{"title":321,"path":322,"order":205,"children":323},"contribute","\u002Fdocs\u002Fcontribute",[324,327,331,335,337,341,345,353,389,393],{"title":313,"path":325,"order":219,"children":326},"\u002Fdocs\u002Fcontribute\u002Fintroduction",[],{"title":328,"path":329,"order":205,"children":330},"Adding Template Settings","\u002Fdocs\u002Fcontribute\u002Fadding-template-settings",[],{"title":332,"path":333,"order":205,"children":334},"API Design","\u002Fdocs\u002Fcontribute\u002Fapi-design",[],{"title":207,"path":210,"order":205,"children":336},[],{"title":338,"path":339,"order":205,"children":340},"Database migrations","\u002Fdocs\u002Fcontribute\u002Fdb-migrations",[],{"title":342,"path":343,"order":205,"children":344},"FlowFuse Architecture","\u002Fdocs\u002Fcontribute\u002Farchitecture",[],{"title":346,"path":347,"order":205,"children":348},"Local Install","\u002Fdocs\u002Fcontribute\u002Flocal",[349],{"title":350,"path":351,"order":205,"children":352},"Local Stacks","\u002Fdocs\u002Fcontribute\u002Flocal\u002Fstacks",[],{"title":354,"path":355,"order":205,"children":356},"State Flows","\u002Fdocs\u002Fcontribute\u002Fworkflows",[357,361,365,369,373,377,381,385],{"title":358,"path":359,"order":205,"children":360},"Device Editor","\u002Fdocs\u002Fcontribute\u002Fworkflows\u002Fdevice-editor",[],{"title":362,"path":363,"order":205,"children":364},"Instance states","\u002Fdocs\u002Fcontribute\u002Fworkflows\u002Fproject-states",[],{"title":366,"path":367,"order":205,"children":368},"Invite External Users","\u002Fdocs\u002Fcontribute\u002Fworkflows\u002Finvite-external-user",[],{"title":370,"path":371,"order":205,"children":372},"Project Creation","\u002Fdocs\u002Fcontribute\u002Fworkflows\u002Fproject-create",[],{"title":374,"path":375,"order":205,"children":376},"Reset Password Flow","\u002Fdocs\u002Fcontribute\u002Fworkflows\u002Fpassword-reset",[],{"title":378,"path":379,"order":205,"children":380},"Team creation Flow","\u002Fdocs\u002Fcontribute\u002Fworkflows\u002Fteam-create",[],{"title":382,"path":383,"order":205,"children":384},"User Login Flows","\u002Fdocs\u002Fcontribute\u002Fworkflows\u002Flogin",[],{"title":386,"path":387,"order":205,"children":388},"User Sign up Flow","\u002Fdocs\u002Fcontribute\u002Fworkflows\u002Fsignup",[],{"title":390,"path":391,"order":205,"children":392},"Team Broker","\u002Fdocs\u002Fcontribute\u002Fteam-broker",[],{"title":394,"path":395,"order":205,"children":396},"Working with Feature Flags","\u002Fdocs\u002Fcontribute\u002Ffeature-flags",[],{"title":398,"path":399,"order":205,"children":400},"device-agent","\u002Fdocs\u002Fdevice-agent",[401,405,408,412,416,421],{"title":402,"path":403,"order":219,"children":404},"FlowFuse Device Agent Introduction","\u002Fdocs\u002Fdevice-agent\u002Fintroduction",[],{"title":230,"path":406,"order":224,"children":407},"\u002Fdocs\u002Fdevice-agent\u002Fquickstart",[],{"title":409,"path":410,"order":197,"children":411},"Register your Remote Instance","\u002Fdocs\u002Fdevice-agent\u002Fregister",[],{"title":413,"path":414,"order":247,"children":415},"Running the Agent","\u002Fdocs\u002Fdevice-agent\u002Frunning",[],{"title":417,"path":418,"order":419,"children":420},"Deploying your Flows","\u002Fdocs\u002Fdevice-agent\u002Fdeploy",6,[],{"title":422,"path":423,"order":205,"children":424},"install","\u002Fdocs\u002Fdevice-agent\u002Finstall",[425,430,434,438,442],{"title":426,"path":427,"group":428,"order":219,"children":429},"Overview","\u002Fdocs\u002Fdevice-agent\u002Finstall\u002Foverview","DeviceAgentInstallation",[],{"title":431,"path":432,"group":428,"order":224,"children":433},"Device Agent Installer","\u002Fdocs\u002Fdevice-agent\u002Finstall\u002Fdevice-agent-installer",[],{"title":435,"path":436,"group":428,"order":200,"children":437},"Docker Install","\u002Fdocs\u002Fdevice-agent\u002Finstall\u002Fdocker",[],{"title":439,"path":440,"group":428,"order":197,"children":441},"Kubernetes Install","\u002Fdocs\u002Fdevice-agent\u002Finstall\u002Fkubernetes",[],{"title":443,"path":444,"group":428,"order":247,"children":445},"Manual Install with NPM","\u002Fdocs\u002Fdevice-agent\u002Finstall\u002Fmanual",[],{"title":447,"path":448,"order":205,"children":449},"hardware","\u002Fdocs\u002Fhardware",[450,453,457,461],{"title":426,"path":451,"order":219,"children":452},"\u002Fdocs\u002Fhardware\u002Fintroduction",[],{"title":454,"path":455,"order":224,"children":456},"ctrlX - Node-RED","\u002Fdocs\u002Fhardware\u002Fctrlx-node-red",[],{"title":458,"path":459,"order":200,"children":460},"ctrlX - Device Agent","\u002Fdocs\u002Fhardware\u002Fctrlx-device-agent",[],{"title":462,"path":463,"order":200,"children":464},"Raspberry Pi with Raspbian","\u002Fdocs\u002Fhardware\u002Fraspbian",[],{"title":422,"path":466,"order":205,"children":467},"\u002Fdocs\u002Finstall",[468,471,475,479,499,503,507,511],{"title":426,"path":469,"order":219,"children":470},"\u002Fdocs\u002Finstall\u002Fintroduction",[],{"title":472,"path":473,"order":205,"children":474},"Configuring FlowFuse","\u002Fdocs\u002Finstall\u002Fconfiguration",[],{"title":476,"path":477,"order":205,"children":478},"DNS Setup","\u002Fdocs\u002Finstall\u002Fdns-setup",[],{"title":480,"path":481,"order":205,"children":482},"Docker install","\u002Fdocs\u002Finstall\u002Fdocker",[483,487,491,495],{"title":484,"path":485,"order":205,"children":486},"Add Project Stacks on Docker","\u002Fdocs\u002Finstall\u002Fdocker\u002Fstacks",[],{"title":488,"path":489,"order":205,"children":490},"Docker Engine on Windows","\u002Fdocs\u002Finstall\u002Fdocker\u002Fwindows-docker-ce",[],{"title":492,"path":493,"order":205,"children":494},"Docker from AWS Market Place","\u002Fdocs\u002Finstall\u002Fdocker\u002Faws-marketplace",[],{"title":496,"path":497,"order":205,"children":498},"Docker on Digital Ocean","\u002Fdocs\u002Finstall\u002Fdocker\u002Fdigital-ocean",[],{"title":500,"path":501,"order":205,"children":502},"Email configuration","\u002Fdocs\u002Finstall\u002Femail-providers",[],{"title":504,"path":505,"order":205,"children":506},"First Run Setup","\u002Fdocs\u002Finstall\u002Ffirst-run",[],{"title":508,"path":509,"order":205,"children":510},"FlowFuse File Storage","\u002Fdocs\u002Finstall\u002Ffile-storage",[],{"title":512,"path":513,"order":205,"children":514},"Install FlowFuse on Kubernetes","\u002Fdocs\u002Finstall\u002Fkubernetes",[515,519,523,527,531,535],{"title":516,"path":517,"order":205,"children":518},"AWS EKS Installation","\u002Fdocs\u002Finstall\u002Fkubernetes\u002Faws",[],{"title":520,"path":521,"order":205,"children":522},"AWS EKS Installation with Terraform and Helm","\u002Fdocs\u002Finstall\u002Fkubernetes\u002Faws-terraform",[],{"title":524,"path":525,"order":205,"children":526},"Digital Ocean Kubernetes Installation","\u002Fdocs\u002Finstall\u002Fkubernetes\u002Fdigital-ocean",[],{"title":528,"path":529,"order":205,"children":530},"Ingress Controller Migration","\u002Fdocs\u002Finstall\u002Fkubernetes\u002Fingress-controller-migration",[],{"title":532,"path":533,"order":205,"children":534},"Kubernetes Project Stacks","\u002Fdocs\u002Finstall\u002Fkubernetes\u002Fstacks",[],{"title":536,"path":537,"order":205,"children":538},"OpenShift Installation","\u002Fdocs\u002Finstall\u002Fkubernetes\u002Fopenshift",[],{"title":540,"path":541,"order":205,"children":542},"migration","\u002Fdocs\u002Fmigration",[543,546],{"title":313,"path":544,"order":219,"children":545},"\u002Fdocs\u002Fmigration\u002Fintroduction",[],{"title":547,"path":548,"order":205,"children":549},"Node-RED Tools plugin","\u002Fdocs\u002Fmigration\u002Fnode-red-tools",[],{"title":551,"path":552,"order":205,"children":553},"user","\u002Fdocs\u002Fuser",[554,558,562,566,570,575,579,583,587,591,595,599,611,615,619,623,627,631,635,639,643,647,651,655,659,663,666,670],{"title":555,"path":556,"order":219,"children":557},"Getting Started","\u002Fdocs\u002Fuser\u002Fintroduction",[],{"title":559,"path":560,"order":219,"children":561},"Static asset service","\u002Fdocs\u002Fuser\u002Fstatic-asset-service",[],{"title":563,"path":564,"order":224,"children":565},"Bill of Materials","\u002Fdocs\u002Fuser\u002Fbill-of-materials",[],{"title":567,"path":568,"order":224,"children":569},"FlowFuse Concepts","\u002Fdocs\u002Fuser\u002Fconcepts",[],{"title":571,"path":572,"order":573,"children":574},"Instance States","\u002Fdocs\u002Fuser\u002Finstance-states",10,[],{"title":576,"path":577,"order":205,"children":578},"Changing the Stack","\u002Fdocs\u002Fuser\u002Fchangestack",[],{"title":580,"path":581,"order":205,"children":582},"Custom Hostnames","\u002Fdocs\u002Fuser\u002Fcustom-hostnames",[],{"title":584,"path":585,"order":205,"children":586},"Custom Node Packages","\u002Fdocs\u002Fuser\u002Fcustom-npm-packages",[],{"title":588,"path":589,"order":205,"children":590},"Dashboards","\u002Fdocs\u002Fuser\u002Fdashboards",[],{"title":592,"path":593,"order":205,"children":594},"DevOps Pipelines","\u002Fdocs\u002Fuser\u002Fdevops-pipelines",[],{"title":596,"path":597,"order":205,"children":598},"Environment Variables","\u002Fdocs\u002Fuser\u002Fenvvar",[],{"title":600,"path":601,"order":205,"children":602},"FlowFuse Expert","\u002Fdocs\u002Fuser\u002Fexpert",[603,607],{"title":604,"path":605,"order":205,"children":606},"AI in Node-RED","\u002Fdocs\u002Fuser\u002Fexpert\u002Fnode-red-embedded-ai",[],{"title":608,"path":609,"order":205,"children":610},"Chat Interface","\u002Fdocs\u002Fuser\u002Fexpert\u002Fchat",[],{"title":612,"path":613,"order":205,"children":614},"FlowFuse File Nodes","\u002Fdocs\u002Fuser\u002Ffilenodes",[],{"title":616,"path":617,"order":205,"children":618},"FlowFuse MQTT Nodes","\u002Fdocs\u002Fuser\u002Fmqtt-nodes",[],{"title":620,"path":621,"order":205,"children":622},"FlowFuse Persistent Context","\u002Fdocs\u002Fuser\u002Fpersistent-context",[],{"title":624,"path":625,"order":205,"children":626},"FlowFuse Project Nodes","\u002Fdocs\u002Fuser\u002Fprojectnodes",[],{"title":628,"path":629,"order":205,"children":630},"FlowFuse Tables","\u002Fdocs\u002Fuser\u002Fff-tables",[],{"title":632,"path":633,"order":205,"children":634},"Groups","\u002Fdocs\u002Fuser\u002Fdevice-groups",[],{"title":636,"path":637,"order":205,"children":638},"High Availability mode","\u002Fdocs\u002Fuser\u002Fhigh-availability",[],{"title":640,"path":641,"order":205,"children":642},"HTTP Access Tokens","\u002Fdocs\u002Fuser\u002Fhttp-access-tokens",[],{"title":644,"path":645,"order":205,"children":646},"Instance Settings","\u002Fdocs\u002Fuser\u002Finstance-settings",[],{"title":648,"path":649,"order":205,"children":650},"Logging","\u002Fdocs\u002Fuser\u002Flogs",[],{"title":652,"path":653,"order":205,"children":654},"Role-Based Access Control","\u002Fdocs\u002Fuser\u002Frole-based-access-control",[],{"title":656,"path":657,"order":205,"children":658},"Shared Team Library","\u002Fdocs\u002Fuser\u002Fshared-library",[],{"title":660,"path":661,"order":205,"children":662},"Snapshots","\u002Fdocs\u002Fuser\u002Fsnapshots",[],{"title":390,"path":664,"order":205,"children":665},"\u002Fdocs\u002Fuser\u002Fteambroker",[],{"title":667,"path":668,"order":205,"children":669},"Teams","\u002Fdocs\u002Fuser\u002Fteam",[],{"title":671,"path":672,"order":205,"children":673},"User Settings","\u002Fdocs\u002Fuser\u002Fuser-settings",[],1786546037550]