<commit_before>---

  - include: requirements-check.yml
  - include: pre-bootstrap.yml

  - name: Copy Dockerfile into chroot path temporarily
    copy: >
        src=Dockerfile_{{ live_os }}
        dest={{ chrootpath }}/Dockerfile

  - name: Build a docker image based on our Dockerfile
    docker_image: >
        path={{chrootpath}}
        name=squashible-{{ansible_run_uuid}}
        state=present

  - name: Run docker container to create bootstrapped chroot
    docker: >
        image=squashible-{{ansible_run_uuid}}
        name=squashible-{{ansible_run_uuid}}
        hostname=squashible-{{ansible_run_uuid}}
        privileged=True

  - name: Get pid of docker container we just started
    script: ../files/get_docker_pid.sh squashible-{{ansible_run_uuid}}
    register: container_pid

  - name: Waiting for docker container to finish bootstrapping
    wait_for: path=/proc/{{container_pid.stdout | int}}/status state=absent

  - name: Extract the filesystem to our chroot
    shell: docker cp squashible-{{ansible_run_uuid}}:/tmp/bootstrap/ {{ chrootpath }}

  - name: Destroy docker container
    docker: >
        image=squashible-{{ansible_run_uuid}}
        name=squashible-{{ansible_run_uuid}}
        state=absent

  - name: Destroy docker image
    docker_image: >
        name=squashible-{{ansible_run_uuid}}
        state=absent<commit_msg>Wrap up the Docker stuff<commit_after>---

  - include: requirements-check.yml
  - include: pre-bootstrap.yml

  - name: Copy Dockerfile into chroot path temporarily
    copy: >
        src=Dockerfile_{{ live_os }}
        dest={{ chrootpath }}/Dockerfile

  - name: Build a docker image based on our Dockerfile
    docker_image: >
        path={{chrootpath}}
        name=squashible-{{ansible_run_uuid}}
        state=present

  - name: Remove the Dockerfile
    file: path={{chrootpath}}/Dockerfile state=absent

  - name: Run docker container to create bootstrapped chroot
    docker: >
        image=squashible-{{ansible_run_uuid}}
        name=squashible-{{ansible_run_uuid}}
        hostname=squashible-{{ansible_run_uuid}}
        privileged=True

  - name: Get pid of docker container we just started
    script: ../files/get_docker_pid.sh squashible-{{ansible_run_uuid}}
    register: container_pid

  - name: Waiting for docker container to finish bootstrapping
    wait_for: path=/proc/{{container_pid.stdout | int}}/status state=absent

  - name: Extract the filesystem to our chroot
    shell: docker cp squashible-{{ansible_run_uuid}}:/tmp/bootstrap/ {{ chrootpath }}

  - name: Destroy docker container
    docker: >
        image=squashible-{{ansible_run_uuid}}
        name=squashible-{{ansible_run_uuid}}
        state=absent

  - name: Destroy docker image
    docker_image: >
        name=squashible-{{ansible_run_uuid}}
        state=absent

  - name: Move the docker filesystem into the root of the chroot path
    shell: mv {{chrootpath}}/bootstrap/* {{chrootpath}}
{'fraction_non_alphanumeric': 0.10301592680447307, 'fraction_numerical': 0.0, 'mean_word_length': 3.151898734177215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6935304', 'n_tokens_mistral': 974, 'n_tokens_neox': 890, 'n_words': 220}