Closed AlexMercier closed 5 months ago
Hi, yes, you can do this by mounting input and output files:
# fill variables:
INPUT_FILE= # input file with extension lottie, json or tgs
OUTPUT_FILE= # output file path with extension gif, apng or webp
# --- script ---
INPUT_EXT="${INPUT_FILE##*.}"
OUTPUT_EXT="${OUTPUT_FILE##*.}"
# create empty output file to mount it in container
touch $OUTPUT_FILE
# convert
docker run --rm -v $INPUT_FILE:/source/animation.$INPUT_EXT -v $OUTPUT_FILE:/source/animation.$INPUT_EXT.$OUTPUT_EXT edasriyan/lottie-to-$OUTPUT_EXT
Hi! Now converting using docker will convert all files in directory. How can I run Docker command to convert only one file in dir?