I'm using jenkins to build docker containers and send the completed image to AWS S3 bucket.
I'm trying to get a file that is pulled from Github onto the docker image and then package it up into a docker image.
Currently I have jenkins completing the git pull and building the container but I can not get it to copy the files to the container. I get this error:
Building in workspace /var/lib/jenkins/jobs/copy-to-docker/workspace
[workspace] $ /bin/sh -xe /tmp/hudson5108979322433439821.sh
+ docker cp /var/lib/jenkins/jobs/Move git pull files to docker/workspace/html/:index.html
+ :/var/lib/docker/containers
/tmp/hudson5108979322433439821.sh: 2: /tmp/hudson5108979322433439821.sh: :/var/lib/docker/containers: not found
docker: "cp" requires 2 arguments.
See 'docker cp --help'.
Usage: docker cp [OPTIONS] CONTAINER:PATH LOCALPATH|-
docker cp [OPTIONS] LOCALPATH|- CONTAINER:PATH
Copy files/folders between a container and the local filesystem
Use '-' as the source to read a tar archive from stdin
and extract it to a directory destination in a container.
Use '-' as the destination to stream a tar archive of a
container source to stdout.
Build step 'Execute shell' marked build as failure
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Finished: FAILURE`
I also want to change the container ID and name of the container but I have looked through the docker docs and I have not been able to find a way to do this?