How to run private image?


#1

Hi,

I am using CircleCI 2.0 with workflows: build > test > deploy.

At Build:
Primary image: circleci/python:2.7
Here I make some changes to some file using sed and I built my private docker image and pushed to docker hub so that the image built would contain changes due to that sed command

At Test:
Primary image: my private image
checkout and run tests

At Deploy:
Primary image: my private image
I did not checkout here but instead try to deploy using the file I edited using sed in the build job.
Job failed because there was no code found. (I ssh into the circleci container and found it to be empty)

Is using my private image as the primary image the same as doing a docker run? If so, why do I not see my project when I ssh into the container? Doing “checkout” would enable me to see my code and run the command but it would not have the changes from the sed in the previous job (build)

Anyone have any idea/advice? Thanks you :slight_smile:


#2

Hey,

Yes, you wont have the same files that you’ve edited in different workflows. If you want the same code/files to exist in different workflows you need to save the workspace and attach it where needed.

See: https://circleci.com/docs/2.0/configuration-reference/#persist_to_workspace

Hope that helps :slight_smile:

Cheers


#3

Hey! Thank you for your help! :smiley:


#4

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.