MammothJerk Posted May 4, 2021 Posted May 4, 2021 (edited) I'm trying to get a specific container to remove a file before the container is started. but i can't quite seem to get it to work running "rm /mnt/user/storage/file.txt" from outside the container in the unraid temrinal works fine, and running "rm /storage/file.txt" (where /mnt/user/storage:/storage) from inside the container console both work fine. but i cant seem to get the logic in the docker container settings. i've tried both commands in the post arguments box but neither seems to run so i'm not sure what i'm supposed to do here. Thanks! Edited May 5, 2021 by MammothJerk Quote
MammothJerk Posted May 4, 2021 Author Posted May 4, 2021 (edited) read other issues in this subforum and found my solution && docker exec containername sh -c 'rm /storage/file.txt' So apparently this script only runs when the container is rebuilt, and not on start/restart So i'm still looking for a solution Edited May 5, 2021 by MammothJerk Quote
MammothJerk Posted May 24, 2021 Author Posted May 24, 2021 i emailed the unraid support as well but they said they dont support docker lol. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.