procedure to execute multiple commands in a ubuntu service using a docker compose

how to run 2 commands in compose yaml in my below case it is throwing issues as below :

version: '3'
services:
  web1:
    build: ./composetest
    ports:
       - "81:80"
  web2:
    build: ./composetest2
    ports:
       - "82:80"
  ubuntu:
    image: "ubuntu:latest"
    command: apt-get update
    command: apt-get install -y apache2
    command: ["/usr/sbin/apachectl", "start", "-D", "FOREGROUND"]



[[email protected] ~]# docker-compose up
Starting root_web1_1     ... done
Starting root_web2_1     ... done
Recreating root_ubuntu_1 ... error

ERROR: for root_ubuntu_1 Cannot start service ubuntu: OCI runtime
create failed: container_linux.go:348: starting container process
caused “exec: “/usr/sbin/apachectl”: stat /usr/sbin/apachectl: no
such file or directory”: unknown

ERROR: for ubuntu Cannot start service ubuntu: OCI runtime create
failed: container_linux.go:348: starting container process caused
“exec: “/usr/sbin/apachectl”: stat /usr/sbin/apachectl: no such file
or directory”: unknown
ERROR: Encountered errors while bringing up the project.

Source: StackOverflow