You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When attempting to get basic auth working with the satispress plugin I am running into some issues.
As part of my build process I do composer update and then, docker build . --file Dockerfile --tag image:tag and it works well, but when I attempt to add packages using satispress with composer and an accompanying auth.json that sits next to composer.json for basic-auth I get the following error.
[Composer\Downloader\TransportException]
The 'https://mydomain.com/satispress/affiliate-wp/2.6.3' URL required authentication.
You must be using the interactive console to authenticate
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
The command '/bin/bash -o pipefail -c composer install --no-dev --no-interaction --no-progress --no-ansi --no-scripts' returned a non-zero code: 255
I'm thinking auth credentials are never picked up as part of the build. It looks like there is a way to set up the auth with the COMPOSER_AUTH environment variable as part of the build but don't know if there is a way to inject this into the Docker build.
Describe the solution you'd like
Ideally a build arg for enabling a way to pass COMPOSER_AUTH with specified credentials in the child Dockerfile. Something like docker build . --file Dockerfile --build-arg COMPOSER_AUTH='{"http-basic": {"domain": {"username": "abc", "password": "123"}}}' --tag image:tag and something in the Dockerfile for passing the onbuild env.
It looks like passing this arg should be possible using this approach.
Additional context
I originally opened an issue in the stack-example-bedrock repo but it looks like that is probably not the best place for it. I'm still parsing through the repo trying to understand how everything is built so I can try testing this locally.
The text was updated successfully, but these errors were encountered:
I have not had any success injecting the auth config as an environment variable with build args, BUT I was able to modify the upstream Docker image and get the basic-auth working by injecting a local auth.json file into the Dockerfile on this line.
I don't think this is a viable solution though, because the build fails if there is no auth.json file present in the bedrock repo that composer generates. Not sure if there is a way around that.
Is your feature request related to a problem? Please describe.
When attempting to get basic auth working with the satispress plugin I am running into some issues.
As part of my build process I do
composer update
and then,docker build . --file Dockerfile --tag image:tag
and it works well, but when I attempt to add packages using satispress with composer and an accompanyingauth.json
that sits next tocomposer.json
for basic-auth I get the following error.I'm thinking auth credentials are never picked up as part of the build. It looks like there is a way to set up the auth with the
COMPOSER_AUTH
environment variable as part of the build but don't know if there is a way to inject this into the Docker build.Describe the solution you'd like
Ideally a build arg for enabling a way to pass
COMPOSER_AUTH
with specified credentials in the child Dockerfile. Something likedocker build . --file Dockerfile --build-arg COMPOSER_AUTH='{"http-basic": {"domain": {"username": "abc", "password": "123"}}}' --tag image:tag
and something in the Dockerfile for passing the onbuild env.It looks like passing this arg should be possible using this approach.
Additional context
I originally opened an issue in the
stack-example-bedrock
repo but it looks like that is probably not the best place for it. I'm still parsing through the repo trying to understand how everything is built so I can try testing this locally.The text was updated successfully, but these errors were encountered: