Editing a config file from a docker container
Asked Answered
G

0

0

This the docker image I want to modify.

So Steps what I have done is

 - docker pull biomystery/sra-tools-pigz:2.10.9
 - docker run -it -d --name kcm_sra_tool d97f2ab7e64f
 - docker exec -it be7b9d647cd0 /bin/sh

Next I found the location of the configuration file I wanted to edit

/usr/local/ncbi/sra-tools/bin/vdb-config

Here vdb-config is the one which need to be modified to increase the timeout.

If i grep the timeout inside the vdb-config file I see this

cat vdb-config | grep "timeout"
/libs/kns/connect/timeout
/http/timeout/read
/http/timeout/write
/libs/kns/connect/timeout/read
/libs/kns/connect/timeout/write
%s - no timeout specified - call will succeed
%s - timeout specified - call will fail
f_recv_timeout: %u ms
ssl->f_recv(_timeout)
handshake timeout
update timeout value to %d millisecs
systimeout.c
vdb_mbedtls_ssl_conf_read_timeout
vdb_mbedtls_ssl_conf_handshake_timeout

So since I'm not sure if I would edit it inside the container if that would work.

Therefore I tried to copy it into local.

docker cp 553293a5a33c:/usr/local/ncbi/sra-tools/bin/vdb-config  vdb-config

After copy I see something like this

lrwxrwxrwx. 1 forest_users   12 Dec 18  2020 vdb-config -> vdb-config.2

When I tried to see the file content cat vdb-config cat: vdb-config: No such file or directory

So how do I make changes in the vdb-config file either inside the container or locally and put it back again and build a modified docker image.

Inside the container there are no editor it seems as I tried nano it shows no command.

Any suggestion or help would be really appreciated

Guarantee answered 18/7, 2023 at 19:18 Comment(4)
That looks like it's an executable file (maybe a symbolic link to an executable file) and not a configuration file. Are you looking for something else? Are you actually working on the code, or just running this prebuilt application?September
" Are you actually working on the code, or just running this prebuilt application? " Yes I want to add or increase the time-out and build a new modified docker image and the option to increase timeout is given here github.com/ncbi/sra-tools/wiki/06.-Connection-Timeouts the command is this vdb-config -s /http/timeout/read=10000Guarantee
In that case you probably need to edit the original source code and recompile. You can't usually modify a compiled binary (Docker or otherwise). What have you set up so far; what code change have you made?September
"What have you set up so far; what code change have you made?" I haven't tried in the docker image as such only in sratool kit installed locally where we can invoke the command like argument and set the parameter but I have no knowledge how to do that i the docker imageGuarantee

© 2022 - 2024 — McMap. All rights reserved.