I've been battling an issue with a corporate proxy when trying to run docker-compose up -d nginx mysql
I'm attempting to run the Laradock container on OSX but keep running into errors when composer attempts to install dependencies. I've updated my docker settings to notify it about my corporate proxy:
Before adding the proxy information, I was receiving this error:
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Since updating the proxy details, I am now receiving this error:
Step 27/183 : RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then composer global install ;fi
---> Running in a7699d4ecebd
Changed current directory to /home/laradock/.composer
Loading composer repositories with package information
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL: Success
Failed to enable crypto
failed to open stream: operation failed
I'm an experienced dev, but new to Docker. I think that the error is being caused because PHP is running inside the docker container but for some reason does not have access to my local certificates?
Related
Im trying to use buildctl tool with Artifactory registry running on my localhost.
I'm using the following command.
buildctl build \
--frontend=dockerfile.v0 \
--local context=. \
--local dockerfile=. \
--output type=image,name=192.168.0.110:8082/docker-local/test,push=true,registry.insecure=true \
--export-cache type=registry,ref=192.168.0.110:8082/docker-local/test,mode=max,push=true,registry.insecure=true \
--import-cache type=registry,ref=192.168.0.110:8082/docker-local/test,registry.insecure=true
I added the flag "registry.insecure=true" as stated in the documentation.
but, still getting the following error:
> exporting content cache:
------
error: failed to solve: error writing layer blob: failed to do request: Head "https://192.168.0.110:8082/v2/docker-local/test/blobs/sha256:03d1cdba14f373b9dbca6b5fe65f8eca1e9852aaaf9060450b27f924a56a1b3c": remote error: tls: unrecognized name
Seems like it's trying to reach the local repo with HTTPS.
How can I make it work with HTTP?
Using version: buildctl github.com/moby/buildkit 0.11.1
The buildkit daemon needs to be run with a configuration file that specifies the registry is http instead of https. See the documentation on buildkitd.toml:
[registry."192.168.0.110:8082"]
http = true
The file path is /etc/buildkit/buildkitd.toml for rootful mode, ~/.config/buildkit/buildkitd.toml for rootless mode.
I am getting this error on windows 10 and the command I am using is
"./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript/ -ccl javascript"
and the error I am getting is :
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image inspection failed: cannot connect to Docker endpoint
Chaincode installation on peer0.org1 has failed
Deploying chaincode failed
Docker version 20.10.7, build f0df350
docker-compose version 1.29.2, build 5becea4c
The command and the response of above :
/c/fabric-samples/test-network (main)
$ ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript/ -ccl javascript
deploying chaincode on channel 'mychannel'
executing with the following
CHANNEL_NAME: mychannel
CC_NAME: basic
CC_SRC_PATH: ../asset-transfer-basic/chaincode-javascript/
CC_SRC_LANGUAGE: javascript
CC_VERSION: 1.0
CC_SEQUENCE: 1
CC_END_POLICY: NA
CC_COLL_CONFIG: NA
CC_INIT_FCN: NA
DELAY: 3
MAX_RETRY: 5
VERBOSE: false
peer lifecycle chaincode package basic.tar.gz --path ../asset-transfer-basic/chaincode-javascript/ --lang node --label basic_1.0
res=0
Chaincode is packaged
Installing chaincode on peer0.org1...
Using organization 1
peer lifecycle chaincode install basic.tar.gz
res=1
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image inspection failed: cannot connect to Docker endpoint
Chaincode installation on peer0.org1 has failed
Deploying chaincode failed
Ok, I am not 100% sure but to package nodejs chaincode on windows you need some necessary Visual Studio C++ Build Tools which seems to be missing /cause of error.
npm install --global windows-build-tools
Checkout Windows extra under - Prerequisites Hyperledger-fabric docs
My question is is there any notable difference between running Docker-Machine as a snap vs built from a source ? I'm having networking issue and I suspect it may be related to the type of installation.
this is what I get when I try point active host to the Docker:
executing: docker-machine env instance
output:
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host
after executing: docker-machine -D regenerate-certs instance
output:
SSH cmd err, output: fork/exec /usr/bin/ssh: permission denied:
Error getting ssh command 'exit 0' : ssh command error:
command : exit 0
err : fork/exec /usr/bin/ssh: permission denied
Changing permissions for the mentioned directory didn't help.
Each time when starting docker-compose up on Laradock, receives Permission error for workspace laradock on Windows 10. I have tried restarting but not working.
PS D:\projects\sites\laradock> docker-compose up -d nginx mysql phpmyadmin redis workspace
laradock_redis_1 is up-to-date
laradock_mysql_1 is up-to-date
laradock_docker-in-docker_1 is up-to-date
laradock_phpmyadmin_1 is up-to-date
Starting laradock_workspace_1 ... error
ERROR: for laradock_workspace_1 Cannot start service workspace: driver failed programming external connectivity on endpoint laradock_workspace_1 (cc289cd2758bb1c99d3f8aab7243220a94078e19b2a1f4a08e4b0b01fbba64a3): Error starting userland proxy: Bind for 0.0.0.0:2222: unexpected error Permission denied
ERROR: for workspace Cannot start service workspace: driver failed programming external connectivity on endpoint laradock_workspace_1 (cc289cd2758bb1c99d3f8aab7243220a94078e19b2a1f4a08e4b0b01fbba64a3): Error starting userland proxy: Bind for 0.0.0.0:2222: unexpected error Permission denied
ERROR: Encountered errors while bringing up the project.
I think you can find your answer here .In short you should execute this command netcfg -d this will clean up all networking devices, and requires a reboot
There is an error cannot start docker after did yum update on Centos with error message :
error response from daemon : failed to initialize logging driver: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see.aws.config.CredentialsChainVerboseError.
The problem was solved by add credentials variable AWS Key on path :
/usr/lib/systemd/system/docker.service
Environment="AWS_ACCESS_KEY_ID=XXX"
Environment="AWS_SECRET_ACCESS_KEY=XXX"
Environment="AWS_DEFAULT_REGION=XXX"