Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Defining FILE__TOKEN doesn't work #77

Closed
1 task done
MagicLegend opened this issue Aug 1, 2024 · 5 comments
Closed
1 task done

[BUG] Defining FILE__TOKEN doesn't work #77

MagicLegend opened this issue Aug 1, 2024 · 5 comments

Comments

@MagicLegend
Copy link

MagicLegend commented Aug 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I've switched from an AMD64 system to an ARM system, and now the configuration I had for the container no longer works:

version: "2.1"
secrets:
  duckdns_token:
    file: ./duckdns_token.txt
services:
  duckdns:
    image: lscr.io/linuxserver/duckdns
    container_name: duckdns
    secrets:
      - duckdns_token
    environment:
      - PUID=1000 #optional
      - PGID=1000 #optional
      - TZ=Europe/Amsterdam
      - SUBDOMAINS=mydomain
      - FILE__TOKEN=/run/secrets/duckdns_token
      - LOG_FILE=false #optional
    # volumes:
    #   - /path/to/appdata/config:/config #optional
    restart: unless-stopped

Where ./duckdns_token.txt is a root owned 600 permissions file containing the token without a newline. When I get a shell in the container I see that the secrets file is set, but the environment variable is set to an empty line:

image

Expected Behavior

The TOKEN env variable is set, as per the documentation at https://docs.linuxserver.io/images/docker-duckdns/?h=duckdns#environment-variables-from-files-docker-secrets

Steps To Reproduce

I'm not quite sure, but the issue appeared for me when I switched from an AMD64 system to an ARM (aarch64) system.

Environment

- OS: Ubuntu 24.04
- How docker service was installed: apt

CPU architecture

arm64

Docker creation

`docker compose up -d`

Container logs

duckdns  | [migrations] started
duckdns  | [migrations] no migrations found
duckdns  | [env-init] Your secret: FILE__TOKEN
duckdns  |            contains a trailing newline and may not work as expected
duckdns  | [env-init] TOKEN set from FILE__TOKEN
duckdns  | ───────────────────────────────────────
duckdns  |
duckdns  |       ██╗     ███████╗██╗ ██████╗
duckdns  |       ██║     ██╔════╝██║██╔═══██╗
duckdns  |       ██║     ███████╗██║██║   ██║
duckdns  |       ██║     ╚════██║██║██║   ██║
duckdns  |       ███████╗███████║██║╚██████╔╝
duckdns  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
duckdns  |
duckdns  |    Brought to you by linuxserver.io
duckdns  | ───────────────────────────────────────
duckdns  |
duckdns  | To support the app dev(s) visit:
duckdns  | DuckDNS: https://www.patreon.com/user?u=3209735
duckdns  |
duckdns  | To support LSIO projects visit:
duckdns  | https://www.linuxserver.io/donate/
duckdns  |
duckdns  | ───────────────────────────────────────
duckdns  | GID/UID
duckdns  | ───────────────────────────────────────
duckdns  |
duckdns  | User UID:    1000
duckdns  | User GID:    1000
duckdns  | ───────────────────────────────────────
duckdns  | Linuxserver.io version: 245f78ab-ls26
duckdns  | Build-date: 2024-07-15T04:01:42+00:00
duckdns  | ───────────────────────────────────────
duckdns  |
duckdns  | Detecting IPv4 via DuckDNS
duckdns  | curl: (3) URL rejected: Malformed input to a URL function
duckdns  | Something went wrong, please check your settings Thu Aug  1 11:42:11 CEST 2024
duckdns  | The response returned was:
duckdns  |
duckdns  |
duckdns  | [custom-init] No custom files found, skipping...
duckdns  | [ls.io-init] done.
Copy link

github-actions bot commented Aug 1, 2024

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@Roxedus
Copy link
Member

Roxedus commented Aug 1, 2024

Look at the warning in your log regarding token

@MagicLegend
Copy link
Author

Yes, I'm aware. I can't find where that warning is coming from, I'm under the impression its incorrect. The file does not have an trailing newline. If it did, it would show in the box as:

image

(Note the extra newline under the token now)

@Roxedus
Copy link
Member

Roxedus commented Aug 1, 2024

It has a trailing newline. the prompt would start on the same line if it didnt.
image

@MagicLegend
Copy link
Author

Ah I see, nice that nano does that on its own without prompting :) I was under the impression I had sed any trailing newline off already, but I guess not.

$TOKEN is still not defined, but the warning did disappear now. Thanks!

@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants