diff --git a/docker/compose/docker-compose.yml b/docker/compose/docker-compose.yml index daade0cd..deb213db 100644 --- a/docker/compose/docker-compose.yml +++ b/docker/compose/docker-compose.yml @@ -63,7 +63,7 @@ services: build: context: ../../ dockerfile: docker/compose/mozdef_bootstrap/Dockerfile - command: bash -c 'sleep 7 && source /opt/mozdef/envs/python/bin/activate && python initial_setup.py http://elasticsearch:9200 defaultMappingTemplate.json' + command: bash -c 'sleep 7 && source /opt/mozdef/envs/python/bin/activate && python docker/conf/initial_setup.py http://elasticsearch:9200 config/defaultMappingTemplate.json' depends_on: - base - elasticsearch diff --git a/docker/compose/mozdef_bootstrap/Dockerfile b/docker/compose/mozdef_bootstrap/Dockerfile index 1aadcb7e..e985fb08 100644 --- a/docker/compose/mozdef_bootstrap/Dockerfile +++ b/docker/compose/mozdef_bootstrap/Dockerfile @@ -1,7 +1,11 @@ FROM mozdef_base:latest -COPY docker/compose/mozdef_bootstrap/files/initial_setup.py /opt/mozdef/envs/mozdef/initial_setup.py -COPY config/defaultMappingTemplate.json /opt/mozdef/envs/mozdef/defaultMappingTemplate.json +RUN \ + mkdir /opt/mozdef/envs/mozdef/config && \ + mkdir -p /opt/mozdef/envs/mozdef/docker/conf + +COPY docker/conf/initial_setup.py /opt/mozdef/envs/mozdef/docker/conf/initial_setup.py +COPY config/defaultMappingTemplate.json /opt/mozdef/envs/mozdef/config/defaultMappingTemplate.json RUN chown -R mozdef:mozdef /opt/mozdef/envs/mozdef/