René's URL Explorer Experiment


Title: Bug: The `examples/docker-local` template does not work out-of-the-box · Issue #1345 · coder/coder · GitHub

Open Graph Title: Bug: The `examples/docker-local` template does not work out-of-the-box · Issue #1345 · coder/coder

X Title: Bug: The `examples/docker-local` template does not work out-of-the-box · Issue #1345 · coder/coder

Description: This could either be seen as a bug, documentation improvement or both. OS Information OS: Ubuntu 20.04.4 LTS running on Coder v1 coder --version: v0.5.4-devel+ad8d9dd Steps to Reproduce Note that here we are running coder in production m...

Open Graph Description: This could either be seen as a bug, documentation improvement or both. OS Information OS: Ubuntu 20.04.4 LTS running on Coder v1 coder --version: v0.5.4-devel+ad8d9dd Steps to Reproduce Note that h...

X Description: This could either be seen as a bug, documentation improvement or both. OS Information OS: Ubuntu 20.04.4 LTS running on Coder v1 coder --version: v0.5.4-devel+ad8d9dd Steps to Reproduce Note that h...

Opengraph URL: https://github.com/coder/coder/issues/1345

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: The `examples/docker-local` template does not work out-of-the-box","articleBody":"This could either be seen as a bug, documentation improvement or both.\r\n\r\n## OS Information\r\n\r\n- OS: Ubuntu 20.04.4 LTS running on Coder v1\r\n- `coder --version`: `v0.5.4-devel+ad8d9dd`\r\n\r\n## Steps to Reproduce\r\n\r\nNote that here we are running `coder` in `production` mode.\r\n\r\n1. Set up postgres database\r\n2. Run coder server: `CODER_PG_CONNECTION_URL=\"postgres://...\" coder server`\r\n3. Run `coder login http://127.0.0.1:3000`\r\n4. Create template from docker-local example: `coder templates create docker-local -d ~/src/coder/examples/docker-local`\r\n5. Create workspace: `coder create -t docker-local my-test`\r\n\r\n## Expected\r\n\r\nThe `coder create` and `coder ssh my-test` commands should just work™️.\r\n\r\n## Actual\r\n\r\n(**Note:** I originally created this issue due to silent failure of `coder create` making it seem like it's just taking a long time for the workspace to start up, but that seems to be related to https://github.com/coder/coder/issues/1036 and possibly fixed?)\r\n\r\nRunning `coder create --template=docker-local my-test` gives an error:\r\n\r\n```\r\n  This template has customizable parameters. Values can be\r\n  changed after create, but may have unintended side effects\r\n  (like data loss).\r\n\r\nvar.docker_image\r\n  What docker image would you like to use for your workspace?\r\n\r\n  >  codercom/enterprise-base:ubuntu\r\n\r\n┌─────────────────────────────────────────────────────────────┐\r\n│ Workspace Preview                                           │\r\n├─────────────────────────────────────────────────────────────┤\r\n│ RESOURCE                    STATUS      ACCESS              │\r\n├─────────────────────────────────────────────────────────────┤\r\n│ docker_container.workspace  ephemeral                       │\r\n│ └─ dev (linux, amd64)                    coder ssh my-test  │\r\n├─────────────────────────────────────────────────────────────┤\r\n│ docker_volume.coder_volume  persistent                      │\r\n└─────────────────────────────────────────────────────────────┘\r\n> Confirm create? (yes/no)\r\n✔ Queued [45ms]\r\n✔ Setting up [6ms]\r\n⧗  Starting workspace\r\n  Terraform 1.1.9\r\n  coder_agent.dev: Plan to create\r\n  docker_volume.coder_volume: Plan to create\r\n  docker_container.workspace[0]: Plan to create\r\n  Plan: 3 to add, 0 to change, 0 to destroy.\r\n  coder_agent.dev: Creating...\r\n  coder_agent.dev: Creation complete after 0s [id=990e17cb-62a9-4227-9d7b-247b669321ac]\r\n  docker_volume.coder_volume: Creating...\r\n  docker_volume.coder_volume: Creation complete after 0s [id=coder-coder-my-test-root]\r\n  docker_container.workspace[0]: Creating...\r\n  docker_container.workspace[0]: Creation errored after 1s\r\n  Error: container exited immediately\r\n\r\n✘ Starting workspace [2014ms]\r\nexit status 1\r\n```\r\n\r\nBut there is no indication as to what's wrong. With an older version of `coder server` (with the silent failure mentioned above), the docker container is not cleaned up and we can inspect it's log:\r\n\r\n```\r\n❯ docker logs coder-coder-my-test-root\r\ncurl: (7) Failed to connect to 127.0.0.1 port 3000: Connection refused\r\n```\r\n\r\nWe see that the container didn't successfully complete its bootstap due to inability to download the agent (from a bad access URL).\r\n\r\nThere are ~~four~~ three things to observe here:\r\n\r\n1. The access URL is unspecified and defaulting to `127.0.0.1` which is likely not what we want to propagate inside the workspace being created inside the Docker container\r\n2. The coder server is not listening on the Docker interface (`--address 0.0.0.0:3000` would help)\r\n3. If this was a `--dev` instance we might not run into this issue when a tunnel is created\r\n4. ~~The `curl` error (and subsequent container exit) did not propagate and result in `coder server` being able to inform the user that the bootstrap failed (terraform issue? fixed as per observations in https://github.com/coder/coder/issues/1036?)~~\r\n\r\n\r\n## Notes\r\n\r\nThere are a few ways we could improve upon this, some ideas:\r\n\r\n1. Improve documentation for `examples/docker-local` to mention all knobs that need to be tuned\r\n2. Detect server/template configuration mismatches that can never work (e.g. the `127.0.0.1` access URL is not likely to work inside any sort of container system, nor is `coder server` listening on `127.0.0.1`)\r\n3. Better error reporting in the cli (could we show the container error log?)","author":{"url":"https://github.com/mafredri","@type":"Person","name":"mafredri"},"datePublished":"2022-05-09T13:29:00Z","url":"https://github.com/coder/coder/issues/1345"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:3963c0bd-8d3a-7456-0399-86f255f2ad99
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCC02:E0ADF:874E31:AB64DA:6B01D275
html-safe-nonce5a707e6b8160c863fb8224b19c39715b2393603ccc6e4153123effc6c1aa6999
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzAyOkUwQURGOjg3NEUzMTpBQjY0REE6NkIwMUQyNzUiLCJ2aXNpdG9yX2lkIjoiNzU4NDg1NjAyNTQwOTM3Njg4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc0050ed1035555c8e71358f06064292c746f1c0a39be3196870acb24f000c43c
hovercard-subject-tagissue:1229712376
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/1345/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9ebf75e360963618d778f1ea689bd0dc512c407714f68cd8557ac9a28ff15337/coder/coder/issues/1345
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9ebf75e360963618d778f1ea689bd0dc512c407714f68cd8557ac9a28ff15337/coder/coder/issues/1345
og:image:altThis could either be seen as a bug, documentation improvement or both. OS Information OS: Ubuntu 20.04.4 LTS running on Coder v1 coder --version: v0.5.4-devel+ad8d9dd Steps to Reproduce Note that h...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemafredri
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/1345#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F1345
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F1345
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/1345
Reloadhttps://github.com/coder/coder/issues/1345
Reloadhttps://github.com/coder/coder/issues/1345
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/1345
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/1345
Bug: The examples/docker-local template does not work out-of-the-boxhttps://github.com/coder/coder/issues/1345#top
https://github.com/johnstcn
apiArea: HTTP APIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22api%22
Community MVPhttps://github.com/coder/coder/milestone/2
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on May 9, 2022https://github.com/coder/coder/issues/1345#issue-1229712376
#1036https://github.com/coder/coder/issues/1036
Final output on workspace creation shows "connecting" forever - confusing UX #1036https://github.com/coder/coder/issues/1036
mafredrihttps://github.com/mafredri
bug 🐛https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22bug%20%3Abug%3A%22
on May 9, 2022https://github.com/coder/coder/issues/1345#event-6573207125
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on May 9, 2022https://github.com/coder/coder/issues/1345#issuecomment-1121270510
#1198https://github.com/coder/coder/issues/1198
mafredrihttps://github.com/mafredri
apiArea: HTTP APIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22api%22
needs grooming 🪒https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs%20grooming%20%3Arazor%3A%22
on May 10, 2022https://github.com/coder/coder/issues/1345#event-6583891959
missknisshttps://github.com/misskniss
needs grooming 🪒https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs%20grooming%20%3Arazor%3A%22
needs grooming 🪒https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs%20grooming%20%3Arazor%3A%22
on May 12, 2022https://github.com/coder/coder/issues/1345#event-6595271577
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on May 12, 2022https://github.com/coder/coder/issues/1345#issuecomment-1125480477
#1176https://github.com/coder/coder/issues/1176
https://github.com/tjcran
tjcranhttps://github.com/tjcran
on May 16, 2022https://github.com/coder/coder/issues/1345#issuecomment-1127213645
tjcranhttps://github.com/tjcran
Community MVP 🏁https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22Community%20MVP%20%3Acheckered_flag%3A%22
needs grooming 🪒https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs%20grooming%20%3Arazor%3A%22
on May 16, 2022https://github.com/coder/coder/issues/1345#event-6612897213
tjcranhttps://github.com/tjcran
Community MVPhttps://github.com/coder/coder/milestone/2
on May 16, 2022https://github.com/coder/coder/issues/1345#event-6612897562
https://github.com/johnstcn
johnstcnhttps://github.com/johnstcn
on May 17, 2022https://github.com/coder/coder/issues/1345#issuecomment-1128747180
#1507https://github.com/coder/coder/pull/1507
https://github.com/misskniss
missknisshttps://github.com/misskniss
on May 17, 2022https://github.com/coder/coder/issues/1345#issuecomment-1129015969
@mafredrihttps://github.com/mafredri
@johnstcnhttps://github.com/johnstcn
missknisshttps://github.com/misskniss
johnstcnhttps://github.com/johnstcn
on May 17, 2022https://github.com/coder/coder/issues/1345#event-6625566257
https://github.com/johnstcn
johnstcnhttps://github.com/johnstcn
on May 18, 2022https://github.com/coder/coder/issues/1345#issuecomment-1129847001
@missknisshttps://github.com/misskniss
@bpmcthttps://github.com/bpmct
#1526https://github.com/coder/coder/pull/1526
https://github.com/deansheather
deansheatherhttps://github.com/deansheather
on May 19, 2022https://github.com/coder/coder/issues/1345#issuecomment-1131391555
http://host.docker.internal:3000http://host.docker.internal:3000
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on May 19, 2022https://github.com/coder/coder/issues/1345#issuecomment-1131403860
@deansheatherhttps://github.com/deansheather
https://github.com/tjcran
tjcranhttps://github.com/tjcran
on May 19, 2022https://github.com/coder/coder/issues/1345#issuecomment-1131870715
http://host.docker.internal:3000http://host.docker.internal:3000
@deansheatherhttps://github.com/deansheather
#1176https://github.com/coder/coder/issues/1176
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on May 19, 2022https://github.com/coder/coder/issues/1345#issuecomment-1131896111
#1528https://github.com/coder/coder/issues/1528
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on May 23, 2022https://github.com/coder/coder/issues/1345#issuecomment-1135049535
#1596https://github.com/coder/coder/pull/1596
bpmcthttps://github.com/bpmct
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 23, 2022https://github.com/coder/coder/issues/1345#event-6663607402
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/1345
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/1345
johnstcnhttps://github.com/johnstcn
apiArea: HTTP APIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22api%22
Community MVPhttps://github.com/coder/coder/milestone/2
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.