Skip to content

Enhancement: allow container image to run as nonroot - #1104

Open
Euge908 wants to merge 1 commit into
gotify:masterfrom
Euge908:master
Open

Euge908 wants to merge 1 commit into
gotify:masterfrom
Euge908:master

Conversation

@Euge908

@Euge908 Euge908 commented Dec 3, 2026

Copy link
Copy Markdown

@Euge908
Euge908 requested a review from a team as a code owner December 3, 2026 12:44
@Euge908

Euge908 commented Dec 3, 2026 •

Copy link
Copy Markdown
Author

Sample output:

$ cat docker-compose.yaml 
services:
  gotify:
    container_name: gotify
    build:
      context: .
      dockerfile: docker/Dockerfile
      args:
        GO_VERSION: "1.27.4"
        BUILD_JS: "1"
    image: gotify/server-test
    ports:
      - "8081:8080"
    environment:
      GOTIFY_DEFAULTUSER_PASS: "admin"
      GOTIFY_USER: "2000"
      GOTIFY_GROUP: "2000"
    volumes:
      - ./data:/app/data
    restart: unless-stopped


$ docker compose up -d --build
$ docker exec -it gotify bash
root@e4e406751c6a:/app# apt-get update && apt-get install -y procps
root@e4e406751c6a:/app# ps aux 
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
2000           1  0.0  0.0 2119016 20892 ?       Ssl  12:21   0:00 ./gotify-app serve
root          70  0.0  0.0      0     0 ?        Z    12:21   0:00 [dpkg-preconfigu] <defunct>
root         612  0.1  0.0   4468  3964 pts/0    Ss   12:53   0:00 bash
root         658  0.0  0.0   6716  4040 pts/0    R+   12:53   0:00 ps aux

@Euge908

Euge908 commented Dec 3, 2026

Copy link
Copy Markdown
Author

Sample:

TOKEN="gtfya.NpZLecIeTL8bHW8Q1dwoYtbBALsg69zyQS-VDJP5Hng"
$ curl  "http://localhost:8081/message" -H "X-Gotify-Key: $TOKEN" -F "title=my title" -F "message=my message" -F "priority=5"
{"id":1,"appid":1,"message":"my message","title":"my title","priority":5,"date":"2026-12-03T13:24:47.629824223Z"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant