Run docker-compose in RHEL

I was trying to run ‘docker-compose’ in our environment today, but found following message from RedHat officially:

Is docker-compose included in RHEL or RHEL Atomic Host ?

SOLUTION VERIFIED — Updated August 24 2017 at 11:12 AM -



  • Red Hat Enterprise Linux 7.x


  • We want to install docker-compose on a RHEL 7.4 server. Is it supported ? If not, are there any workarounds without using OpenShift ?
  • Is docker-compose included in RHEL or RHEL Atomic Host ?
  • Can docker-compose be added to the Extras channel - or be made available from Red Hat in general, like the other docker RPMs ?


  • Red Hat recommends OpenShift (kube) and our container development kit, based on minishift, as the preferred technology for low-level container orchestration.
  • The ansible-container project is another project that provides strong overlap in capability with docker-compose and can also work with OpenShift.
  • Red Hat will continue to evaluate docker-compose and ansible-container but there are no plans to include either in RHEL at this time.

So we are on our own…

Get the latest version from Github:

Same as usual, link it to /usr/local/bin/docker-compose

Give it exe permission…

However, here is the problem happening in RHEL 7.4:

docker-compose: error while loading shared libraries: failed to map segment from shared object: Operation not permitted

I tried to disable SElinux, not working…

Finally, I came across this github issue and I tried one of the workarounds which worked in my instance.

Solution was to remount tmp with exec permission by executing :

sudo mount /tmp -o remount,exec

Or have following ansible block:

- name: make mount tmp with exec
path: "/tmp"
state: mounted
src: /dev/mapper/rootvg-tmpvol # your own real path
fstype: xfs # your own real type
opts: nodev,nosuid # as long as you don't have noexec... :)

Problem resolved.

Happy docker-compose~


Like what you read? Give River Yang a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.