#using docker insecure registry

1 messages Β· Page 1 of 1 (latest)

sleek olive
#

Hi there, how can I publish to an insecure registry ?

subtle crypt
#

Hello! Are you getting an error when publishing to an insecure registry? We have a few internal test cases that I believe publish to an http-only registry running on localhost, so I'm curious if you are running in a different circumstance and seeing some different behavior

sleek olive
subtle crypt
sleek olive
#

ok thanks for your quick reply !

next jungle
#

Hi! I have the same problem when I want to pull insecure registry. It can be configured? I can't find how

dull vault
next jungle
#

Thanks! I'm using the Python SDK. Can I use the same toml file? I'll try in a while! Thanks again!

dull vault
next jungle
#

I'm sorry but I can't do it. I tried with /etc/dagger/engine.toml and not working. I run python ci/main.py build command and see this error:

  File "<@beartype(dagger.client.gen.Container.stderr) at 0x7f185b1d9080>", line 10, in stderr
  File "/home/calmiron/monorepo/.venv/lib64/python3.11/site-packages/dagger/client/gen.py", line 761, in stderr
    return await _ctx.execute(str)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/calmiron/monorepo/.venv/lib64/python3.11/site-packages/dagger/client/_core.py", line 196, in execute
    raise error from e
dagger.QueryError: failed to do request: Head "https://my-registry.local/v2/node/manifests/20.5.0-slim": tls: failed to verify certificate: x509: certificate signed by unknown authority

When add config_path='/etc/dagger/engine.toml' on ci/main.py the error change to:

python ci/main.py build
Error: unknown flag: --project

[...]


  File "/home/calmiron/monorepo/.venv/lib64/python3.11/site-packages/dagger/_engine/session.py", line 108, in _get_conn
    raise dagger.SessionError(msg)
dagger.SessionError: Failed to start Dagger engine session: Command '/home/calmiron/.cache/dagger/dagger-0.8.1 session --label dagger.io/sdk.name:python --label dagger.io/sdk.version:0.8.1 --project /etc/dagger/engine.toml' returned non-zero exit status 1.

--project is deprecated?

I don't know if I'm very confused. I don't find anything about engine.toml on documentation. :/

# /etc/dagger/engine.toml
debug = true
insecure-entitlements = ["security.insecure"]

[registry."my-registry.local"]
        http = true
        insecure = true
dull vault
next jungle
#

Are you speak spanish? πŸ˜…

dull vault
#

Si πŸ™‚

#

πŸ‡¦πŸ‡·

next jungle
#

Genial! πŸ€— Si tenΓ©s unos minutos avisame porfa

dull vault
#

@next jungle I have 10 minutes now if you're around

dull vault
next jungle
#
docker run --rm -it \
    -v $(pwd)/engine.toml:/etc/dagger/engine.toml \
    --privileged \
    -p 1234:1234 \
    registry.dagger.io/engine:v0.8.1
dull vault
#

_EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://$container_name

next jungle
#

Thanks @dull vault! That's how it works:

# /etc/dagger/engine.toml 

# debug = true
insecure-entitlements = ["security.insecure"]

[registry."my-registry.local"]
        http = true
docker run --name dagger-engine -v /etc/dagger/engine.toml:/etc/dagger/engine.toml --privileged registry.dagger.io/engine:v0.8.1

export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://dagger-engine

python ci/main.py build
burnt cedar
#

I am struggling to get insecure working. I have eddited the engine.toml and restarted the dagger engine.
But did you guys have to run the dagger engine container with --priviledged to get it working ?