RUN with docker-compose

I’m tinkering with docker-compose.yml, and I’m failing at RUN statement:

$ docker-compose up
ERROR: Validation failed in file ‘./docker-compose.yml’, reason(s):
Unsupported config option for ‘X’ service: ‘run’

I need to incorporate few commands to execute, like this:

sudo apt-key adv --recv-keys --keyserver hkp:// 0x5a16e7281be7a449
echo deb debian/ - HHVM Downloads jessie main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm

can someone provide an example how to accomplish this?

Can you post your docker-compose.yml?