--- /dev/null
+FROM mongo:3.6
+
+RUN apt-get update \
+ && apt-get install -y git \
+ && apt-get install -y build-essential \
+ && git clone --depth=1 https://github.com/TylerBrock/mongo-hacker.git \
+ && rm -rf ~/.mongorc.js \
+ && cd mongo-hacker \
+ && make install
+
trap 'make stop' EXIT
if ! docker top mongo_container 2>/dev/null; then
- docker run -d --name mongo_container -p 27017:27017 --rm -v $(pwd)/appdata:/data/db mongo:3.6
+ docker run -d --name mongo_container -p 27017:27017 --rm -v $(pwd)/appdata:/data/db mongo:3.6-hacker
echo "Waiting until mongo is started"
sleep 10
fi
dest: "$XDG_DATA_HOME/bash_completion/_{{ item }}"
loop:
- fl_tmux_dev
+- name: docker images
+ block:
+ - name: check missing docker images
+ register: docker_missing_images
+ shell: '[ -n "$(docker image ls -q {{ item.0 }}:{{ item.1 }})" ] || echo "missing"'
+ loop: "{{ docker_images }}"
+ check_mode: no
+ changed_when: docker_missing_images.stdout != ""
+ - name: Ask for Docker images
+ when: docker_missing_images.changed
+ pause:
+ prompt: "install Fretlink Docker images ? [y/N]"
+ register: docker_install_images
+ check_mode: no
+ - name: install custom docker images
+ when: item.2 is not none and docker_missing_images.changed and docker_install_images.user_input.startswith("y")
+ docker_image:
+ path: "./roles/contexts/fretlink/files/docker/{{ item.2 }}"
+ tag: "{{ item.1 }}"
+ name: "{{ item.0 }}"
+ loop: "{{ docker_images }}"
+ - name: install repository docker images
+ when: item.2 is none and docker_missing_images.changed and docker_install_images.user_input.startswith("y")
+ docker_image:
+ tag: "{{ item.1 }}"
+ name: "{{ item.0 }}"
+ loop: "{{ docker_images }}"