mirror of
https://gitlab.com/stilobique/blender-docker.git
synced 2026-05-27 20:27:47 +02:00
WIP to start the container with a script
This commit is contained in:
@@ -17,6 +17,8 @@ def get_repo_container():
|
||||
dk_container_name = 'blender-cache-repo'
|
||||
dk_images_local = client.images.list(name=dk_tags)
|
||||
dk_containers_local = client.containers.list(filters={'label': dk_container_name})
|
||||
volumes = ["/scripts/:/scripts"]
|
||||
commandes = ['bash', '/scripts/set_all_repository.sh']
|
||||
|
||||
if dk_containers_local:
|
||||
# The container cache exist, used-it
|
||||
@@ -30,7 +32,7 @@ def get_repo_container():
|
||||
else:
|
||||
# No container, no image ; build a new image and start this cache
|
||||
client.images.build(path="image", dockerfile="Dockerfile-csv", tag=f'{dk_tags}:latest', rm=True)
|
||||
client.containers.run(image=dk_tags, name=dk_container_name)
|
||||
client.containers.run(image=dk_tags, name=dk_container_name, volumes=volumes, command=commandes)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user