R
Railway6mo ago
elskwid

GitHub Repo service needs to pull a private docker image

Hi Folks, We have a project using a GitHub Repo service. That repo has a Dockerfile that pulls a private image in the FROM instruction. Some posts here mention Docker authentication working for a Docker Image service, but we don't see that option in our service. Is there a way for us to get our application deployed? Project ID: 1540c21e-5c98-459e-a701-faf38362495a Thanks!
16 Replies
Percy
Percy6mo ago
Project ID: 1540c21e-5c98-459e-a701-faf38362495a
Fragly
Fragly6mo ago
assuming you're on pro plan, you'll have the option to add private image credentials in your service settings like shown here:
No description
elskwid
elskwidOP6mo ago
Hi @Fragly, thanks. The thing is, our service uses a GitHub repository as the source, so the registry credentials option is not present. We're building an image from a Dockerfile that uses a private image as its base. Does that make sense?
Fragly
Fragly6mo ago
ooh, i see! Sorry for my misunderstanding 🙏 I'm not really sure how you'd authenticate the private image in that case Someone else might have an idea though
elskwid
elskwidOP6mo ago
Yeah, it's an odd case. I appreciate the answer, though!
Brody
Brody6mo ago
how would you authenticate that kind of thing locally?
elskwid
elskwidOP6mo ago
There are options, of course: we could (1) make our image public (we don't really want to do that since we may end up with our code in that image), (2) use GiHub or some other service to build the image, then use that image as our source on Railway. For now, we would like the convenience of using the Railway Docker build since it will save us some time. We use docker login to authenticate locally.
Brody
Brody6mo ago
have you tried adding your docker credentials there? it couldn't hurt
elskwid
elskwidOP6mo ago
Adding our credentials where, @Brody?
Brody
Brody6mo ago
check fragly's screenshot
elskwid
elskwidOP6mo ago
That option is not available for a service that uses a GitHub repo as the source.
Brody
Brody6mo ago
ah gotcha then number 2 is going to be the best option, you already have a Dockerfile so adding an action to build it on push to main or during a release would be trivial
elskwid
elskwidOP6mo ago
It's likely the way we'll have to do it, but I was hoping to get a little Railway assistance at this point. We're assessing multiple PaaS deployments to understand the edge cases and opportunities.
Brody
Brody6mo ago
you just wont get that kind of low level control that would allow you to run docker login
elskwid
elskwidOP6mo ago
Yeah. I like the way GitLab has the option to provide Docker credentials to a CI/CD runner. That could be an interesting option. https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#determine-your-docker_auth_config-data
elskwid
elskwidOP6mo ago
And we'd like to do this for branch deploys as well, which complicates things a bit.
Want results from more Discord servers?
Add your server