Copying from Coder host to Docker Template

Hey all, I'm trying to build a docker image on the coder host dynamically (unfortunately, I cannot use another external platform due to license issues). The problem is, that the installer has severy GBs, so it's too large to put it next to the Dockerfile. I tried to overcome this by copying the installer from the host's filesystem with "COPY" in docker, but appearently the file cannot be found. Can anyone help me with that? Thanks
6 Replies
Codercord
Codercord5mo ago
<#1259802569425944616>
Category
Help needed
Product
code-server
Platform
Linux
Logs
Please post any relevant logs/error messages.
Phorcys
Phorcys5mo ago
hey, for large images you should build them somewhere else a (usually using CI) and push them to a registry I'm not sure whether this limit can be increased, but several GBs is probably too much anyways otherwise you can download the installer from within the Dockerfile
Tobias G
Tobias GOP5mo ago
Thanks for the answer. Unfortunately, downloading would require me to install some sort of web or ftp server. the preferred way would be to COPY it from the host in the docker file. but unfortunately, it seems that there is no access to the host's filesystem during building the dockerfile
Atif
Atif5mo ago
I believe it can probably be hacked around. You should be able to mount a host directory to your Coder container or directly use it if the coder is installed directly. You need to set a suitable build context. Although it's not recommended and images should be prebuilt for protection use... Why you just can't build it on the host and tag it? Reference it in your template and it should be able to use the local image.
Tobias G
Tobias GOP5mo ago
sure, local building is possible, it would just be nicer to have Dockerfile and tf at the same place, rather than on some local folder. And as far as I got it, a local build is anyway happening, just started from the coder interface. But I'll go that way, thanks for the help.
Atif
Atif5mo ago
I understand. Let us know if you figure this out. Coder doesn't limit anything except the total template size as they are stored in the database.
Want results from more Discord servers?
Add your server