How to use custom images? #2085
-
Hi! I am very new to Docker and Kubernetes, so this might be a noobish question. I've tried to make a custom image with nodejs, npm and yarn installed. The image can be found in FROM summerwind/actions-runner:latest
RUN sudo apt-get update -y
RUN sudo apt install nodejs -y
RUN sudo apt install npm -y
RUN sudo rm -rf /var/lib/apt/lists/*
# Install Yarn
RUN sudo npm install --global yarn When I try to add this image, Kubernetes keeps trying to build the runners, but always fail. It deletes the runner before I can see the error message. How do I proceed from here? I want to use a custom image, and not use something like setup-node in my actions. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Instead of running the apt in sudo, you could try setting the user to root and at the end of the file change the user to runner.' FROM summerwind/actions-runner:latest
USER root
RUN apt-get update -y \
&& apt install nodejs npm -y \
&& rm -rf /var/lib/apt/lists/* \
&& npm install --global yarn
USER runner |
Beta Was this translation helpful? Give feedback.
-
I don't understand this sentence however you can use stern to preemptively tail the logs so you can see what is going on, it's a suggested tool in the troubleshooting guide https://github.com/actions-runner-controller/actions-runner-controller/blob/master/TROUBLESHOOTING.md#tools |
Beta Was this translation helpful? Give feedback.
-
Seems to work after i built the image with platform Now I am just getting permission denied error on |
Beta Was this translation helpful? Give feedback.
-
We're locking this discussion because it has not had recent activity and/or other members have asked for more information to assist you but received no response. Thank you for helping us maintain a productive and tidy community for all our members. |
Beta Was this translation helpful? Give feedback.
Got it running now.
Final file: