Hi Michael,
i created the Pivot machine (Linux installed docker in it) and able to push .nupkg to pivot machine and trying to build the docker image and publish to docker hub but when i run from octopus, it’s failing. If i run manually from my pivot machine, it able to succeed.
**error from octopus: - **
/home/ec2-user/.octopus/Applications/OctopusServer/Feature\ Environment\ 5/Feature/aspnetapp/2.0.0
October 19th 2018 17:28:25
Info
sudheeramgothu/test
October 19th 2018 17:28:25
Info
sudheeramgothu
October 19th 2018 17:28:25
Info
Building the Docker Image
October 19th 2018 17:28:25
Error
/home/ec2-user/.octopus/OctopusServer/Work/20181019212822-201934-314/Script.sh: line 26: sudo docker build -t sudheeramgothu/test /home/ec2-user/.octopus/Applications/OctopusServer/Feature\ Environment\ 5/Feature/aspnetapp/2.0.0: No such file or directory
October 19th 2018 17:28:25
Fatal
The remote script failed with exit code 127
October 19th 2018 17:28:25
Fatal
The action Docker - Create and Push Image Copy on sudheer’s linux Machine failed
success message from pivot machine manual:
[ec2-user@ip-172-12-0-227 ~]$ sudo docker build -t sudheeramgothu/test /home/e-user/.octopus/Applications/OctopusServer/Feature\ Environment\ 5/Feature/aspnetapp/2.0.0
it able to create the docker image.
this is my application location: /home/ec2-user/.octopus/Applications/OctopusServer/Feature\ Environment\ 5/Feature/aspnetapp/2.0.0
and this is my Bash script:
Get the parameters.
appLocation=$(get_octopusvariable “ApplicationLocation”)
dockerFile=$(get_octopusvariable “DockerFile”)
imageName=$(get_octopusvariable “ImageName”)
tag=$(get_octopusvariable “ImageTag”)
dockerUsername=$(get_octopusvariable “DockerUsername”)
dockerPassword=$(get_octopusvariable “DockerPassword”)
echo “$appLocation”
echo “$imageName”
echo “$dockerUsername”
Prepare the final image name with the tag.
#$imageName += ‘:’ + $tag
Create the docker image
echo “Building the Docker Image”
"sudo docker build -t $imageName $appLocation"
#echo "Pushing docker image to hub tagged as $imageName"
#sudo docker login -u $dockerUsername -p $dockerPassword
#sudo docker push $imageName
Could you please help me ?
Thanks,
Sudheer.