dockerfile / devcontainer setup?

93 views Asked by At

I'm trying to create a docker image / Dev Container for my development. One goal was to have fish/omf (oh-my-fish)/omf Theme(bobthefish) in the image. I finally figured out how to get omf installed but i'm having trouble with getting the theme installed. It looks like when you install omf you have to logout and login. I thought no problem i'll just source config.fish.

source ~/.config/fish/config.fish.

That wasn't working (file not found). I looked at what was in the ~/.config/fish folder and this what was in there:

#10 0.201 total 16
#10 0.201 drwx------ 1 vscode vscode 4096 Oct 27 20:15 .
#10 0.201 drwxr-xr-x 1 vscode vscode 4096 Oct 27 20:15 ..
#10 0.201 drwxr-xr-x 2 vscode vscode 4096 Oct 27 20:15 conf.d

No config.fish file.

So i thought maybe i could just do this in my docker file: User MyUser & RUN fish and maybe it would fix it but no luck there either. I been messing around and it appears that those files aren't created until you log in interactively. What other options do i have here?

Here is how the dockerfile current looks granted i have tried many things so its looked quite different during the process I have some of the things i've tried commented out:

FROM mcr.microsoft.com/devcontainers/go:1-1.21-bookworm

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
#     && apt-get -y install --no-install-recommends <your-package-list-here>

RUN apt-get update
RUN apt-get install fish -y
USER vscode
RUN fish
RUN  curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > omf
RUN fish ./omf --noninteractive --yes --verbose


#RUN  sudo su -c "fish ./omf --noninteractive --yes" vscode
#RUN ls -al /home/vscode/.config/fish
#RUN . ~/.config/fish/config.fish
#RUN omf install bobthefish | fish

The last command fails of course since there is no config.fish file.

0

There are 0 answers