Hi All,
Since the removal of k3s and the addition of docker compose, i’ve been trying to port over some of things I’ve had and struggling a bit. I’m much more familiar with helm rather than docker compose. I’ve had a look at the implementation (the python framework here: githubdotcom/truenas/apps) and as far as i can tell it seems like the container class should support this feature (githubdotcom/truenas/apps/blob/f97759423fdccd65d0c16724a0400d305b75b5c6/library/2.1.8/container.py#L303) yet i’ve been having all kinds of trouble to get this working.
The main problem i seem to be hitting is args are not being passed through to the building of the container? As the below docker compose manifest results in the posted error message in /var/log/app_lifecycle.log
name: onedev
services:
onedev:
image: 1dev/server:11.6.9
restart: on-failure:5
ports:
- 30010:6610
- 30011:6611
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- REDACTED:/opt/onedev
environment:
initial_user: REDACTED
initial_password: REDACTED
initial_email: REDACTED
initial_server_url: REDACTED
hibernate_connection_password: REDACTED
hibernate_dialect: io.onedev.server.persistence.PostgreSQLDialect
hibernate_connection_driver_class: org.postgresql.Driver
hibernate_connection_url: jdbc:postgresql://postgres:5432/REDACTED
hibernate_connection_username: REDACTED
deploy:
resources:
limits:
cpus: "2"
memory: "2147483648"
healthcheck:
test: curl --silent --fail http://localhost:6610/
timeout: 5s
interval: 10s
retries: 5
start_period: 10s
depends_on:
postgres:
condition: service_healthy
required: true
proton-bridge:
condition: service_healthy
required: true
postgres:
image: postgres:14-alpine3.15
restart: on-failure:5
expose:
- "5432"
volumes:
- REDACTED:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: REDACTED
POSTGRES_USER: REDACTED
POSTGRES_DB: REDACTED
deploy:
resources:
limits:
cpus: "1"
memory: "1073741824"
healthcheck:
test: pg_isready -h 127.0.0.1 -p 5432 -d REDACTED -U REDACTED
timeout: 5s
interval: 10s
retries: 5
start_period: 10s
proton-bridge:
build:
args:
- PROTON_BRIDGE_VERSION=3.16.0
dockerfile_inline: |
FROM golang:1.21.9 as build
ARG PROTON_BRIDGE_VERSION
RUN apt-get update && apt-get install -y libsecret-1-dev
RUN git clone https://github.com/ProtonMail/proton-bridge.git
WORKDIR proton-bridge
RUN git checkout tags/v$PROTON_BRIDGE_VERSION
RUN sed -i 's/Host = "127.0.0.1"/Host = "0.0.0.0"/g' internal/constants/constants.go
RUN make build-nogui
FROM debian:12.8-slim
COPY --from=build /go/proton-bridge /opt/proton-bridge
RUN ln --symbolic /opt/proton-bridge/proton-bridge /bin/proton-bridge
RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg \
pass \
libsecret-1-dev \
&& rm -rf /var/lib/apt/lists/*
RUN gpg --batch --passphrase "" --quick-gen-key "ProtonMail Bridge" default default never
RUN pass init "ProtonMail Bridge"
EXPOSE 1025
EXPOSE 1143
CMD echo "login\n$PROTON_EMAIL\n$PROTON_PASSWORD" | proton-bridge --cli
tags:
- inline-proton-bridge:custom
image: inline-proton-bridge:custom
restart: on-failure:5
ports:
- 30025:1025
- 30043:1143
volumes:
- REDACTED:~/.local/share/protonmail
environment:
PROTON_EMAIL: REDACTED
PROTON_PASSWORD: REDACTED
deploy:
resources:
limits:
cpus: "1"
memory: "536870912"
healthcheck:
test: curl --silent --fail imap://$PROTON_EMAIL:$PROTON_PASSWORD@localhost:1143/
timeout: 5s
interval: 10s
retries: 5
start_period: 10s
[2025/01/11 13:53:47] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'onedev' app:
time="2025-01-11T13:53:41+10:00" level=warning msg="The \"PROTON_BRIDGE_VERSION\" variable is not set. Defaulting to a blank string."
time="2025-01-11T13:53:41+10:00" level=warning msg="The \"PROTON_EMAIL\" variable is not set. Defaulting to a blank string."
time="2025-01-11T13:53:41+10:00" level=warning msg="The \"PROTON_PASSWORD\" variable is not set. Defaulting to a blank string."
time="2025-01-11T13:53:41+10:00" level=warning msg="The \"PROTON_EMAIL\" variable is not set. Defaulting to a blank string."
time="2025-01-11T13:53:41+10:00" level=warning msg="The \"PROTON_PASSWORD\" variable is not set. Defaulting to a blank string."
proton-bridge Pulling
proton-bridge Warning pull access denied for inline-proton-bridge, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
failed to solve: process "/bin/sh -c git checkout tags/v" did not complete successfully: exit code: 1
has anyone else used this feature? or has the team confirmed this is fully implemented? is there anything obvious im doing wrong? i could totally accept this is a me problem as i previously mentioned im quite new to the docker compsoe world, i come from the kubernetes world
any help would be greatly appreciated!