Title: Unable to create public forwarded port in devcontainer · Issue #30 · codespaces-io/codespaces · GitHub
Open Graph Title: Unable to create public forwarded port in devcontainer · Issue #30 · codespaces-io/codespaces
X Title: Unable to create public forwarded port in devcontainer · Issue #30 · codespaces-io/codespaces
Description: This project explains how to forward ports manually, which works fine. My objective is to simplify the instructions, in particular, to create forwarded the port via the .devcontainer. My source was this doc. I duplicated the working proj...
Open Graph Description: This project explains how to forward ports manually, which works fine. My objective is to simplify the instructions, in particular, to create forwarded the port via the .devcontainer. My source was...
X Description: This project explains how to forward ports manually, which works fine. My objective is to simplify the instructions, in particular, to create forwarded the port via the .devcontainer. My source was...
Opengraph URL: https://github.com/codespaces-io/codespaces/issues/30
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to create public forwarded port in devcontainer","articleBody":"[This project](https://github.com/ApiLogicServer/working_software_now) explains how to forward ports **manually**, which works fine.\r\n\r\nMy objective is to simplify the instructions, in particular, to **create forwarded the port via the `.devcontainer`**. My source was [this doc](https://docs.github.com/en/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace).\r\n\r\nI duplicated the working project to create [this new project](https://github.com/ApiLogicServer/template), with an altered `.devcontainer`:\r\n\r\n```\r\n// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:\r\n// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/docker-existing-dockerfile\r\n{\r\n\t\"name\": \"Existing Dockerfile\",\r\n\r\n\t// Sets the run context to one level up instead of the .devcontainer folder.\r\n\t\"context\": \"..\",\r\n\r\n\t// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.\r\n\t\"dockerFile\": \"../For_VSCode.dockerfile\",\r\n\r\n\t// Set *default* container specific settings.json values on container create.\r\n\t\"settings\": {},\r\n\r\n\t// add network -- enable this as required, e.g., https://valhuber.github.io/ApiLogicServer/Database-Connectivity/\r\n\t// \"runArgs\": [\"--network=dev-network\"],\r\n\r\n\t// Add the IDs of extensions you want installed when the container is created.\r\n\t\"extensions\": [\"ms-python.python\"],\r\n\t\r\n\t\"portsAttributes\": {\r\n\t\t\"5656\": {\r\n\t\t\t\"label\": \"AdminApp\"\r\n\t\t}\r\n\t},\r\n\r\n\t// Use 'forwardPorts' to make a list of ports inside the container available locally.\r\n\t\"forwardPorts\": [\r\n\t\t5656\r\n\t]\r\n\r\n\t// Uncomment the next line to run commands after the container is created - for example installing curl.\r\n\t// \"postCreateCommand\": \"apt-get update && apt-get install -y curl\",\r\n\r\n\t// Uncomment when using a ptrace-based debugger like C++, Go, and Rust\r\n\t// \"runArgs\": [ \"--cap-add=SYS_PTRACE\", \"--security-opt\", \"seccomp=unconfined\" ],\r\n\r\n\t// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.\r\n\t// \"mounts\": [ \"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind\" ],\r\n\r\n\t// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.\r\n\t// \"remoteUser\": \"vscode\"\r\n}\r\n```\r\n\r\nThe port is, in fact, created. The problem appears to be that the **port is not *public***. I verified that by doing it manually.\r\n\r\nI tried to explore the code completion, to no avail:\r\n\r\n\u003cimg width=\"1113\" alt=\"Unable to make port public\" src=\"https://user-images.githubusercontent.com/5579631/198152910-43cc29bb-91d8-44a9-b35e-d782fc6514eb.png\">\r\n\r\n\r\n....\r\n\r\nSo, seeking suggestions on creating a *public* port via the `devcontainer`.\r\n","author":{"url":"https://github.com/valhuber","@type":"Person","name":"valhuber"},"datePublished":"2022-10-26T23:07:55Z","url":"https://github.com/codespaces-io/codespaces/issues/30"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:46d5bd46-b703-2d9b-cb43-9bf64d539311 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 99C2:4373B:C5A3D:F33D9:6B08C7A9 |
| html-safe-nonce | c5f45a0c3cbc216f30085b295b28f057638ffbcd144ad2596269dbf43fda6e41 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUMyOjQzNzNCOkM1QTNEOkYzM0Q5OjZCMDhDN0E5IiwidmlzaXRvcl9pZCI6IjgyNjE2MjI5Mzg1OTI2NTkzNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1c8a2a6de5985c0c367aaafa5e5e559d9bc6d122f65640bb0b486b9139172539 |
| hovercard-subject-tag | issue:1424800151 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/codespaces-io/codespaces/30/issue_layout |
| twitter:image | https://opengraph.githubassets.com/25e304e5a8da27c952c0d38facce640cd14ec776af24f54e03cc637619450d19/codespaces-io/codespaces/issues/30 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/25e304e5a8da27c952c0d38facce640cd14ec776af24f54e03cc637619450d19/codespaces-io/codespaces/issues/30 |
| og:image:alt | This project explains how to forward ports manually, which works fine. My objective is to simplify the instructions, in particular, to create forwarded the port via the .devcontainer. My source was... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | valhuber |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60e86161f3e246339ce8d4bd308e3da0ecd5ebd5e610d57e00d21487fe085d68 |
| turbo-cache-control | no-preview |
| go-import | github.com/codespaces-io/codespaces git https://github.com/codespaces-io/codespaces.git |
| octolytics-dimension-user_id | 25740123 |
| octolytics-dimension-user_login | codespaces-io |
| octolytics-dimension-repository_id | 82297094 |
| octolytics-dimension-repository_nwo | codespaces-io/codespaces |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82297094 |
| octolytics-dimension-repository_network_root_nwo | codespaces-io/codespaces |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e87e2b0f8aff9e45b7ac6c81be5a939ad971830c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width