aws / aws/aws-codebuild-docker-images
Artifacts folder not created on windows
- Dominant language
- Dockerfile
- Stars
- 1.2k
- Forks
- 971
- Avg merge
- 2h 47m
- Merged PRs (30d)
- 1
Description
This is the command I run:
`./codebuild_build.sh -i aws/codebuild/standard:4.0 -a ./artifacts -s ./sample-web-app
`
This is the error I was seeing;
```
$ ./codebuild_build.sh -i aws/codebuild/standard:4.0 -a ./artifacts -s ./sample-web-app
Build Command:
docker run -it -v //var/run/docker.sock:/var/run/docker.sock -e "IMAGE_NAME=aws/codebuild/standard:4.0" -e "ARTIFACTS=//C/Users/SK/Downloads/codebuilddemo/artifacts" -e "SOURCE=//C/Users/SK/Downloads/codebuilddemo/sample-web-app" -e "INITIATOR=SK" public.ecr.aws/codebuild/local-builds:latest
Stopping agent-resources_agent_1 ... done
Removing agent-resources_build_1 ... done
Removing agent-resources_agent_1 ... done
Removing network agent-resources_default
Removing volume agent-resources_source_volume
Removing volume agent-resources_user_volume
Creating network "agent-resources_default" with the default driver
Creating volume "agent-resources_source_volume" with local driver
Creating volume "agent-resources_user_volume" with local driver
Creating agent-resources_agent_1 ... done
Creating agent-resources_build_1 ... error
ERROR: for agent-resources_build_1 Cannot start service build: b"error while creating mount source path '/C/Users/SK/Downloads/codebuilddemo/artifacts': mkdir /C/Users/SK/Downloads/codebuilddemo/artifacts: operation not permitted"
ERROR: for build Cannot start service build: b"error while creating mount source path '/C/Users/SK/Downloads/codebuilddemo/artifacts': mkdir /C/Users/SK/Downloads/codebuilddemo/artifacts: operation not permitted"
ERROR: Encountered errors while bringing up the project.
```
I ran
`mkdir artifacts`
to create the folder manually and now I get
```
$ ./codebuild_build.sh -i aws/codebuild/standard:4.0 -a ./artifacts -s ./sample-web-app
Build Command:
docker run -it -v //var/run/docker.sock:/var/run/docker.sock -e "IMAGE_NAME=aws/codebuild/standard:4.0" -e "ARTIFACTS=//C/Users/SIKAU/Downloads/codebuilddemo/artifacts" -e "SOURCE=//C/Users/SIKAU/Downloads/codebuilddemo/sample-web-app" -e "INITIATOR=SIKAU" public.ecr.aws/codebuild/local-builds:latest
Removing agent-resources_agent_1 ... done
Removing network agent-resources_default
Removing volume agent-resources_source_volume
Removing volume agent-resources_user_volume
Creating network "agent-resources_default" with the default driver
Creating volume "agent-resources_source_volume" with local driver
Creating volume "agent-resources_user_volume" with local driver
Creating agent-resources_agent_1 ... done
Creating agent-resources_build_1 ... done
Attaching to agent-resources_agent_1, agent-resources_build_1
agent_1 | [Container] 2022/10/19 22:43:20 going inside waitForAgent
agent_1 | [Container] 2022/10/19 22:43:20 Waiting for agent ping
agent_1 | [Container] 2022/10/19 22:43:20 Waiting for DOWNLOAD_SOURCE
agent-resources_agent_1 exited with code 0
Stopping agent-resources_build_1 ... done
Aborting on container exit...
```
but the artifacts folder does not seem to have anything inside.
What is going wrong?
Contributor guide
Research direction
Start with codebuild_build.sh and reproduce the command on Windows using the reported -a and -s paths. Trace how the script constructs the Docker mount paths, then verify the build completes and the artifacts directory is created and populated without manual setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, shell
- Domain
- cloud, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100