How do I teach my gitlab-runner new commands?

I seen in example scripts people are using images. how Can I use/install such images? I am on a gitlab-ce self hosted

I tried to add in my script “apt-get update” but the pipeline does not know this command

A GitLab runner is just a service starting an executor (terminology isn’t optimal, but I don’t think you need to care about the other possible meaning), it doesn’t execute (and thus doesn’t need to know) any commands.

Talking about images makes me think that your runner is using the docker executor, that can use any image that is available.

You’ll have to detail what happens when you run a job containing apt-get update before we can say anything about that.