title: How to convert a Dockerfile to a docker compose image?
body: <p>This is how I'm creating a docker image with nodeJS and meteorJS based on an ubuntu image. I'll use this image to do some testing.</p>
  
  <p>Now I'm thinking of doing this via docker compose. But is this possible at all? Can I convert those commands into a docker compose yml file?</p>
  
  <pre><code>FROM ubuntu:16.04
  
  COPY package.json ./
  
  RUN apt-get update -y &amp;&amp; \
      apt-get install -yqq \
          python \
          build-essential \
          apt-transport-https \
          ca-certificates \
          curl \
          locales \
          nodejs \
          npm \
          nodejs-legacy \
          sudo \
          git
  
  ## NodeJS and MeteorJS
  RUN curl -sL https://deb.nodesource.com/setup_4.x | bash -
  RUN curl https://install.meteor.com/ | sh
  
  ## Dependencies
  RUN npm install -g eslint eslint-plugin-react
  RUN npm install
  
  ## Locale
  ENV OS_LOCALE="en_US.UTF-8"
  RUN locale-gen ${OS_LOCALE}
  ENV LANG=${OS_LOCALE} LANGUAGE=en_US:en LC_ALL=${OS_LOCALE}
  
  ## User
  RUN useradd ubuntu &amp;&amp; \
      usermod -aG sudo ubuntu &amp;&amp; \
      mkdir -p /builds/core/.meteor /home/ubuntu &amp;&amp; \
      chown -Rh ubuntu:ubuntu /builds/core/.meteor &amp;&amp; \
      chown -Rh ubuntu:ubuntu /home/ubuntu
  USER ubuntu
  </code></pre>