Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ekk

ekk

  1. Home
  2. Categories
  3. memes
  4. When webdevs choosing port for their app

When webdevs choosing port for their app

Scheduled Pinned Locked Moved memes
memes
35 Posts 21 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M [email protected]

    Welcome to the community then 🙂 For rootful Docker you are correct - the inside port can be 80 and you can expose it on whatever port you want (ideally you expose it only via reverse proxy and not by port - I can recommend Caddy-Docker-Proxy for that)

    null@slrpnk.netN This user is from outside of this forum
    null@slrpnk.netN This user is from outside of this forum
    [email protected]
    wrote last edited by
    #26

    If you're using a reverse-proxy, why bother mapping ports at all?

    M 1 Reply Last reply
    0
    • null@slrpnk.netN [email protected]

      If you're using a reverse-proxy, why bother mapping ports at all?

      M This user is from outside of this forum
      M This user is from outside of this forum
      [email protected]
      wrote last edited by [email protected]
      #27

      Absolutely, it is not necessary if the proxy can reach the service in other ways (e.g. a shared network). Some non-http services don't like to be proxied though. Some constellations where the proxy is not on the same host as the containers may also make it necessary. My answer was based on the possibility to not have the same inside/outside port, not necessarily the need though😉

      1 Reply Last reply
      1
      • J [email protected]

        Got me curious on rootless vs root docker, there's so much.

        M This user is from outside of this forum
        M This user is from outside of this forum
        [email protected]
        wrote last edited by
        #28

        Since rootless docker is (mostly) a security improvement, here is a interesting list of other Docker realted security tips I like to consult: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html

        1 Reply Last reply
        1
        • O [email protected]
          This post did not contain any content.
          T This user is from outside of this forum
          T This user is from outside of this forum
          [email protected]
          wrote last edited by
          #29

          Can't use 80 or 8080? Lets use 12380!

          1 Reply Last reply
          1
          • K [email protected]

            Vaulwarden does this and I'm really frustrated that I have to cap_add NET_BIND_SERVICE in my rootless setup just to make my password server run.

            gray@pawb.socialG This user is from outside of this forum
            gray@pawb.socialG This user is from outside of this forum
            [email protected]
            wrote last edited by
            #30

            Are you sure you need that? I just added a —user to the docker run and it started just fine on port 80 in the container.

            K 1 Reply Last reply
            0
            • O [email protected]
              This post did not contain any content.
              H This user is from outside of this forum
              H This user is from outside of this forum
              [email protected]
              wrote last edited by [email protected]
              #31

              That’s because 8080 is the official unprivileged alternative port for 80, the HTTP port. Web developers are usually using HTTP, so this makes perfect sense. If it supports HTTPS, then 8443, though that one isn’t official.

              I run a few open source server projects, and they usually default to 8080 for this reason. I have one that uses 8888, and that’s only because it’s meant for temporary ad-hoc servers.

              I’m working on an SFTP server, and it will use 2222, because that’s the most common unprivileged alternative port. There is no official alternative for SSH.

              1 Reply Last reply
              4
              • F [email protected]

                Me & the boys serving http on the boob port

                H This user is from outside of this forum
                H This user is from outside of this forum
                [email protected]
                wrote last edited by
                #32

                I prefer the secure version, boobs.

                1 Reply Last reply
                1
                • M [email protected]

                  Is haproxy okay?

                  H This user is from outside of this forum
                  H This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #33

                  Haproxy is great, but setup is hard. It’s more for load balancing than being an easy reverse proxy.

                  1 Reply Last reply
                  0
                  • R [email protected]

                    I like 6969

                    B This user is from outside of this forum
                    B This user is from outside of this forum
                    [email protected]
                    wrote last edited by
                    #34

                    4200 or 10420 too

                    1 Reply Last reply
                    1
                    • gray@pawb.socialG [email protected]

                      Are you sure you need that? I just added a —user to the docker run and it started just fine on port 80 in the container.

                      K This user is from outside of this forum
                      K This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #35

                      I'm using podman, and I don't like the practice of unnecessarily setting UIDs. NET_BIND_SERVICE is exactly the flag it needs to set port 80 and it doesn't potentially complicate accessing the files for maintenance. Does your system have SELinux? If not, that might be why you don't need it lol.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      Powered by NodeBB Contributors
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups