Hi,
I have to comment the copy command im my dockerfile.
#COPY /app /app
How can I copy “app” directory to inside pod’s container.
I tried initContainers and emptyDir.
But I couldn’t transfer data to created emptyDir.
How can I do that?
regards
Hi,
I have to comment the copy command im my dockerfile.
#COPY /app /app
How can I copy “app” directory to inside pod’s container.
I tried initContainers and emptyDir.
But I couldn’t transfer data to created emptyDir.
How can I do that?
regards
The initContainer should seed the data in the emptydir (e.g. wget), it will do any fetching / permission changes etc.
Though I would highly discourage you from doing so - you can create a bash script inside your container that will fetch the binary when the container starts and put that as the command being run at container start (entrypoint).
#!/bin/bash
curl http://example.com/app -o /tmp/app
chmod +x /tmp/app
/tmp/app
this will break the artifact (make the container dynamic in its operation - see article about artifacts)