'mount fsx in Dockerfile is throwing returned a non-zero code: 22

I am trying to mount fsx in the Dockerfile with following command:

RUN mount -t lustre file_system_dns_name@tcp:/mountname /mnt/fsx -o noatime,flock

But it throws following error:

INFO:batscli.process.process_runner:stdout> {"event": "Docker image build failed, please check log output", "exc_info": true, "exception": {"args": ["The command '/bin/sh -c mount -t lustre file_system_dns_name@tcp:/mountname /mnt/fsx -o noatime,flock' returned a non-zero code: 22"], .....

I cannot write the mount command in separate bash file, because I need it in BATS_TRANSFORM package, which only copies Dockerfile, and not other shell scripts.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source