Read about OpenEMR's Response to the COVID-19 Pandemic at https://www.open-emr.org/covid19/

Cannot copy SNOMED zip file into docker container with docker cp

Situation
Cannot copy SNOMED zip file into docker container with docker cp.

OpenEMR Version
5.0.2 patch 1

Browser:
N/A

Operating System
Ubuntu 18.04
Used 5.0.2 latest docker yml file.
https://hub.docker.com/r/openemr/openemr/

Logs

First I created an account with an account with UMLS
https://utslogin.nlm.nih.gov/cas/login

Then I downloaded the RxNorm Zip file and SNOMEDCT US edition

I was able to copy the RxNorm File over with out issue using:
sudo docker cp RxNorm_full_12022019.zip ‘ellisre1a_openemr_1’:/var/www/localhost/htdocs/openemr/contrib/rxnorm/RxNorm_full_12022019.zip

When I do the same with the snomed file I get an error. Where ellisre1a_openemr_1 is the docker container name.

Command I tried
sudo docker cp ‘SnomedCT_USEditionRF2_PRODUCTION_20190901T120000Z.zip’ ‘ellisre1a_openemr_1’:/var/www/localhost/htdocs/openemr/contrib/snomed/‘SnomedCT_USEditionRF2_PRODUCTION_20190901T120000Z.zip’

Response
“docker cp” requires exactly 2 arguments.
See ‘docker cp --help’.

Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH

Copy files/folders between a container and the local filesystem

I tried again with backtics but that didn’t work either.
sudo docker cp SnomedCT_USEditionRF2_PRODUCTION_20190901T120000Z.zip ‘ellisre1a_openemr_1’:/var/www/localhost/htdocs/openemr/contrib/snomed/SnomedCT_USEditionRF2_PRODUCTION_20190901T120000Z.zip

Response
sh: 1: SnomedCT_USEditionRF2_PRODUCTION_20190901T120000Z.zip: not found
sh: 1: SnomedCT_USEditionRF2_PRODUCTION_20190901T120000Z.zip: not found
“docker cp” requires exactly 2 arguments.
See ‘docker cp --help’.

Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH

Copy files/folders between a container and the local filesystem

if you want that cp command to work, you have to specify where you want to copy the file to as the 2nd argument.

Hi Tyler, thanks for the response. I’m trying to copy it to the contrib/snomed folder.

Do you see some sort of syntax issue I’m missing? It worked for the rxnorm file.

try:

sudo docker cp SnomedCT_USEditionRF2_PRODUCTION_20190901T120000Z.zip ellisre1a_openemr_1:/var/www/localhost/htdocs/openemr/contrib/snomed/SnomedCT_USEditionRF2_PRODUCTION_20190901T120000Z.zip

(also rec looking into making it so don’t need to run sudo when use docker, which can cause odd things to happen sometimes)

Try this:
sudo docker cp SnomedCT_USEditionRF2_PRODUCTION_20190901T120000Z.zip ellisre1a_openemr_1:/var/www/localhost/htdocs/openemr/contrib/snomed/

Just figured out you might have added an unnecessary ’ to the end of the command

EDIT: Brady beat me to posting this :joy::joy:

1 Like