Bind to higher port numbers

When you change the user in a Dockerfile using USER default, the process inside the container runs with the permissions of that user. In COS, only the root user (or processes with elevated privileges) can bind to ports below 1024. So, if our application is trying to bind to a port below 1024, and it's not running as root, we are getting an error.
This commit is contained in:
Andrew Dryga
2023-10-06 12:29:41 -06:00
parent 94af83c029
commit 17a4171e04
2 changed files with 4 additions and 8 deletions

View File

@@ -438,7 +438,7 @@ module "web" {
{
name = "http"
protocol = "TCP"
port = 80
port = 8080
health_check = {
initial_delay_sec = 60
@@ -463,7 +463,7 @@ module "web" {
},
{
name = "PHOENIX_HTTP_WEB_PORT"
value = "80"
value = "8080"
}
], local.shared_application_environment_variables)
@@ -507,7 +507,7 @@ module "api" {
{
name = "http"
protocol = "TCP"
port = 80
port = 8080
health_check = {
initial_delay_sec = 60
@@ -532,7 +532,7 @@ module "api" {
},
{
name = "PHOENIX_HTTP_API_PORT"
value = "80"
value = "8080"
},
], local.shared_application_environment_variables)

View File

@@ -1,9 +1,5 @@
#cloud-config
users:
- name: cloudservice
uid: 2000
write_files:
- path: /etc/otelcol-contrib/config.yaml
permissions: "0644"