Security Token Error in Docker Compose Up Command - docker

I am trying to run docker container in ecs using docker compose.
I have build the image and created the context as well using
docker compose create myecs
But when i run the command docker compose up am getting the following error
UnrecognizedClientException: The security token included in the request is invalid.
status code: 400, request id: 0bb44cc9-4de3-4ac0-a6d5-685069dab0ee
aws configure output:

Related

Unable to pull image from the Gitlab container registry

I have created some images in the Gitlab Container Registry. I am unable to pull them using docker on my local system. The login command succeeds but when I type the following command:
docker pull reg-gitlab-project.company.com/services/palimited/integrationservices/springbootproject/springbootproject:latest
I am getting the following error
Error response from daemon: Head "https://reg-gitlab-project.company.com/v2/services/palimited/integrationservices/springbootproject/springbootproject/manifests/latest": denied: access forbidden
I am unable to figure out why this error is occuring? Can anyone guide me.
You need to authenticate with the container registry at reg-gitlab-project.company.com before issuing a docker pull command.
See, GitLab Docs: Authenticate with the Container Registry.

How to publish a docker image using buildpack's `pack build --publish`?

I am using buildpack to build a docker container, and I want to publish it to a remote container registry.
I am using this command:
pack build myapp --builder heroku/buildpacks:20 --publish
However, this yields the following error:
ERROR: failed to : ensure registry read access to myapp
ERROR: failed to build: executing lifecycle: failed with status code: 1
How can I specify the remote registry URL and credentials? I tried running docker login before running my command but received the same error. The documentation only says the following:
--publish Publish to registry
It follows the same principles as docker tag and docker push.
You need to docker login to your target registry first. pack will also use this to authenticate with your target registry.
You need to use the format <registry-host>:<port>/<project>/<image>:<tag> for the value of your image name. This is the same as with docker push and this is how both utilities know where to send the image.
https://docs.docker.com/engine/reference/commandline/push/#push-a-new-image-to-a-registry
For example:
pack build docker.io/user/myapp:v1.0 --builder heroku/buildpacks:20 --publish

Docker compose -f docker-compose-dev.yaml up fails without error using ecs context

Im attempting to publish a docker compose file to Amazon ECS using the new docker compose up and an ecs context (using security tokens) however i'm getting a blank output in the console.
C:\Repos\Project>docker compose -f docker-compose-up.yaml up
C:\Repos\Project>docker compose ps
C:\Repos\Project>docker compose version
Docker Compose version dev
C:\Repos\Project>docker login
Authenticating with existing credentials...
Login Succeeded
Logging in with your password grants your terminal complete access to your account.
For better security, log in with a limited-privilege personal access token. Learn more at https://docs.docker.com/go/access-tokens/
When i run the above against the default context it works as expected. Its just when im using the ecs context.
Does anyone have any ideas?
Thanks in advance

Docker run in pipeline says `docker: Error response from daemon: authorization denied`

I am trying to setup a bitbucket pipeline and that uses a docker run statement. But build fails with the following error message:
docker: Error response from daemon: authorization denied
Here is the pipeline configuration
pipelines:
default:
- step:
script:
# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -t solc .
# Test the solidity files in project
- docker run solc
Question: I did not perform any operation requiring authorization. Why is the error message talking of authorization.
You are running docker commands on a shared environment. As of the time of this question, Bitbucket does not allow you to run docker run commands in that environment for security purposes. The list of docker commands you can run (as of the time of this question) are:
docker login
docker build
docker tag
docker pull
docker push
docker version
Docker is a client/server application. You are running the client commands and bitbucket has secured their environment on the dockerd daemon.
You can see the current capabilities of their docker integration from their documentation which has been extended since this question was first answered. As of the time of this update, it filters privileged containers and mounting host volumes outside of a predefined subdirectory.

Error in Docker for Windows tutorial

I'm new to Docker so I don't even know where to look. Here are the instructions:
Next, pull a base image that’s compatible with the evaluation build, re-tag it and to a test-run:
docker pull microsoft/windowsservercore:10.0.14393.321
docker tag microsoft/windowsservercore:10.0.14393.321 microsoft/windowsservercore
docker run microsoft/windowsservercore hostname
69c7de26ea48
And this is the error I get on the docker run step:
docker: Error response from daemon: container
6abd92755a8d5d13463eb74f9cc39a798ad0ec898bc1f80ff71205235b63a94f
encountered an error during CreateContainer: failure in a Windows
system call: No hypervisor is present on this system. (0xc0351000)
extra info:
{"SystemType":"Container","Name":"6abd92755a8d5d13463eb74f9cc39a798ad0ec898bc1f80ff71205235b63a94f","Owner":"docker","IsDummy":false,"IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\ProgramData\Docker\windowsfilter\6abd92755a8d5d13463eb74f9cc39a798ad0ec898bc1f80ff71205235b63a94f","Layers":[{"ID":"17e4231d-380e-5dae-b734-0182defea00c","Path":"C:\ProgramData\Docker\windowsfilter\1226fe85e49abd361df8019342eec380ab577268565d2f3d813adcf37d1ccac4"},{"ID":"5fd42877-5043-5d33-a842-d70584cb03eb","Path":"C:\ProgramData\Docker\windowsfilter\53f86340ec419aae07b48e3624d00d7d6f5491f284d8d6e1e62fb7909d9a5fba"}],"HostName":"6abd92755a8d","MappedDirectories":[],"SandboxPath":"C:\ProgramData\Docker\windowsfilter","HvPartition":true,"EndpointList":["91c8a929-c40f-4ad3-a3d2-2906b51cb50a"],"HvRuntime":{"ImagePath":"C:\ProgramData\Docker\windowsfilter\1226fe85e49abd361df8019342eec380ab577268565d2f3d813adcf37d1ccac4\UtilityVM"},"Servicing":false,"AllowUnqualifiedDNSQuery":true}.

Resources