0

In order to mount a directory to a container i used bind mounts https://docs.docker.com/storage/bind-mounts/ Now i'm trying to find a way to replace $docker run -v command.

Gioni
  • 1
  • 1

1 Answers1

0

If you are using kubernetes as that is there in your tag. You can mount a volume as hostpath.

In Pod spec:

  volumeMounts:
    - name: config
      mountPath: <PATH IN CONTAINER>
  volumes:
    - name: config
      hostPath:
        path: <YOUR LOCAL DIR PATH>

Check out https://kubernetes.io/docs/concepts/storage/volumes/ for more details

Vikas Kumar
  • 151
  • 2
  • Is there a way to mount volumes via the arguments of crictl command? Unfortunately is not our choice to configure pod spec – Gioni Sep 23 '21 at 08:35