๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
์ฒœ์ฒœํžˆ, ๊พธ์ค€ํžˆ../LINUX

[Docker] build์‹œ ์กด์žฌํ•˜๋Š” ํŒŒ์ผ์ด not found๋กœ ์—๋Ÿฌ ๋ฐœ์ƒ ์‹œ, ์šฐํšŒ๋ฐฉ๋ฒ•

by MIMI.L 2023. 12. 27.
๋ฐ˜์‘ํ˜•

Summary

- aaa/Dockerfile์—์„œ COPY๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋ณต์‚ฌ ํ•  ํŒŒ์ผ์€ ๊ฐ™์€ ๋””๋ ‰ํ„ฐ๋ฆฌ ๋‚ด์— ์žˆ์–ด์•ผ ํ•จ

- bbb/TarZipFiles ๋ผ๋Š” ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์›๋ณธ์„ ๋ณด๊ด€ํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ,
  ์ด ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ Dockerfile์ด ์œ„์น˜ํ•œ aaa/ ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์˜ฎ๊ฒจ๋‘  (aaa/TarZipFiles)

- ์‹ค์ œ๋กœ COPY ํ•  ํŒŒ์ผ๋“ค์€ aaa/downloads์— ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋งํฌํ•ด๋‘ 

    - Dockerfile์ด aaa/ ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์žˆ๊ณ , ๊ฐ™์€ ๋””๋ ‰ํ„ฐ๋ฆฌ์— TarZipFiles ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ๋‘์—ˆ๊ธฐ ๋•Œ๋ฌธ์—,
      aaa/TarZipFiles์— ์žˆ๋Š” ํŒŒ์ผ์„ ๊ทธ๋Œ€๋กœ COPY์— ์‚ฌ์šฉํ•ด๋„ ๋ฌด๊ด€ !
      ๋‚ด ๊ฒฝ์šฐ์—๋Š” ์‚ฌ์šฉ ํ•  ํŒŒ์ผ๋“ค์ด ๊ณ„์† ๋ฐ”๋€Œ๊ณ  ์žˆ์–ด์„œ ๋ณ„๋„๋กœ ๊ด€๋ฆฌํ•˜๊ณ ์ž downloads์— ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ์ƒ์„ฑํ•˜์—ฌ ์‚ฌ์šฉ

- Dockerfile์—์„œ COPY๋ช…๋ น์œผ๋กœ ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜๋ฉด, ์›๋ณธ ํŒŒ์ผ์ด COPY ๋œ๋‹ค.

    - ์‹ฌ๋ณผ๋ง ๋งํฌ ํŒŒ์ผ์„ COPY -> ์›๋ณธ ํŒŒ์ผ์ด COPY

    - ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ํŒŒ์ผ๋“ค์„ ๋ชจ์•„๋‘” ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ COPY -> ๋””๋ ‰ํ„ฐ๋ฆฌ๊ฐ€ ๊ทธ๋Œ€๋กœ COPY
      (๋””๋ ‰ํ„ฐ๋ฆฌ ์•ˆ์˜ ํŒŒ์ผ๋“ค์€ ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ํŒŒ์ผ, ์ฆ‰ ์›๋ณธX ์›๋ณธ ๊ฐ™์ด COPYํ•˜์ง€ ์•Š์œผ๋ฉด ์‹คํ–‰X)


ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 73ebe1a7-7d4f-4c5c-9793-dab09f746fea::4fff1g6aarsfwdy0gvkab0sc5: "/home/mimi/wk/WRF/Downloads/TarZipFiles/zlib-1.3.tar.gz": not found

 

๋ผ๋Š” ์—๋Ÿฌ๋ฅผ ๋งˆ์ฃผํ–ˆ๋‹ค.

์ด ์—๋Ÿฌ๋Š” Dockerfile์ด ์žˆ๋Š” ์œ„์น˜์˜ ๋””๋ ‰ํ„ฐ๋ฆฌ๊ฐ€ ์•„๋‹Œ ํƒ€ ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์ฐธ์กฐํ•˜์—ฌ ์ƒ๊ธฐ๋Š” ์—๋Ÿฌ !

 

๊ธฐ๋ณธ์ ์œผ๋กœ Dockerfile์ด ์žˆ๋Š” ์œ„์น˜์— ์žˆ์–ด์•ผ ํ•˜์ง€๋งŒ..

๋‚ด ๊ฒฝ์šฐ.. ์—ฌ๋Ÿฌ ๋ฒ„์ „์˜ ๋„์ปค์ด๋ฏธ์ง€๋ฅผ ๋งŒ๋“ค๋ฉด์„œ ๊ฐ™์€ ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜๊ธฐ๋„, ์ผ๋ถ€ ๋‹ค๋ฅธ ํŒŒ์ผ์„ ์ถ”๊ฐ€ํ•ด์„œ ์‚ฌ์šฉํ•˜๊ธฐ๋„ ํ•ด์„œ

๋„์ปคํŒŒ์ผ์ด ์žˆ๋Š” ๋””๋ ‰ํ„ฐ๋ฆฌ๋งˆ๋‹ค ์‚ฌ์šฉํ•˜๋Š” ํŒŒ์ผ์ด ๋‹ฌ๋ž๋‹ค.

 

๋„์ปคํŒŒ์ผ์ด ์กด์žฌํ•˜๋Š” ๋””๋ ‰ํ„ฐ๋ฆฌ๋งˆ๋‹ค ํ•„์š”ํ•œ ํŒŒ์ผ๋“ค์„ ๋ณต์‚ฌํ•ด์„œ ๋‘์ž๋‹ˆ, ๋˜‘๊ฐ™์€ ํŒŒ์ผ๋“ค์„ ์—ฌ๋Ÿฌ๊ณณ์— ๋‘๋Š”๊ฑฐ๋ผ ๋น„ํšจ์œจ์ ์ด์–ด์„œ ํ•œ ๊ณณ์— ๋‘๊ณ  ๊ด€๋ฆฌํ•˜๊ณ ์ž ํ–ˆ๋‹ค.

 

๊ทธ๋ ‡๊ฒŒ ์ˆ˜์ • ํ›„, ๋นŒ๋“œ๋ฅผ ์ง„ํ–‰ํ•˜๊ณ ์ž ํ–ˆ๋”๋‹ˆ ์œ„์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋˜ ๊ฒƒ์ด๋‹ค.

๋ฌธ์ œ๊ฐ€ ๋˜๋Š” ๋ถ€๋ถ„์€ ์•„๋ž˜ ๋ถ€๋ถ„์ด๋‹ค. 

  73 | >>> COPY /home/mimi/wk/WRF/Downloads/TarZipFiles/zlib-1.3.tar.gz                  /home/myuser/WRF/Downloads/zlib-1.3.tar.gz

 

/home/mimi/wk/WRF/Downloads/TarZipFiles/zlib-1.3.tar.gz ์œ„์น˜์— ์žˆ๋Š” ํŒŒ์ผ์„ 

๋„์ปค ์ปจํ…Œ์ด๋„ˆ์˜  /home/myuser/WRF/Downloads/zlib-1.3.tar.gz ์— ๋ณต์‚ฌํ•˜๋ ค๊ณ  ํ–ˆ์—ˆ๋‹ค.

ํ•˜์ง€๋งŒ Dockerfile์€ /home/mimi//wk/docker_wrf/Dockerfile ์— ์กด์žฌํ–ˆ๋‹ค.

 

์ฆ‰, ๋‹ค๋ฅธ ๊ฒฝ๋กœ์— ์žˆ๋Š” ํŒŒ์ผ์„ ๋ณต์‚ฌํ•˜๋ ค๊ณ  ํ•ด์„œ ๋ฐœ์ƒ ํ•œ ๋ฌธ์ œ์˜€๋‹ค.

 

๊ณ ๋ คํ•ด๋ณผ ๋งŒํ•œ ๊ฒƒ๋“ค๋กœ

1, ์ƒ๋Œ€๊ฒฝ๋กœ๋กœ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ X

2. ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์žˆ์—ˆ๋‹ค. X 

******** ๋‚œ.. ๋‘˜ ๋‹ค ์‹คํŒจ..

 

๋‚˜๋Š” ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•ด๋ณด๊ณ ์ž ํ–ˆ๋‹ค.

์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด, ๋งํฌ๋งŒ ์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ถ€๋กœ ๋ณต์‚ฌ๋˜์–ด ์‹ค์ œ๋กœ ์‚ฌ์šฉํ•˜์ง€ ๋ชปํ•˜์ง€ ์•Š์„๊นŒ ์‹ถ์—ˆ์ง€๋งŒ..

"Docker์—์„œ ์‹ฌ๋ณผ๋ฆญ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ, ์ผ๋ฐ˜์ ์œผ๋กœ ๋งํฌ ์ž์ฒด๊ฐ€ ์•„๋‹Œ ๋งํฌ๊ฐ€ ๊ฐ€๋ฆฌํ‚ค๋Š” ์‹ค์ œ ํŒŒ์ผ์ด ์ปจํ…Œ์ด๋„ˆ๋กœ ๋ณต์‚ฌ๋œ๋‹ค."

๊ณ  ๋ณด์•„์„œ ์ง„ํ–‰ํ•ด๋ดค๋‹ค.

 

๋”๋ณด๊ธฐ

- ์‹ฌ๋ณผ๋ฆญ๋งํฌ ๊ฑธ์–ด๋‘ 

mimi@mimi:~/wk/docker_wrf/downloads$ cat .t.sh 
#!/bin/bash

ln -sf /home/mimi/wk/WRF/Downloads/TarZipFiles/geog_high_res_mandatory.tar.gz   .
ln -sf  /home/mimi/wk/WRF/Downloads/TarZipFiles/hdf5-1.10.5.tar.gz              . 
ln -sf  /home/mimi/wk/WRF/Downloads/TarZipFiles/jasper-1.900.1.zip              . 
ln -sf  /home/mimi/wk/WRF/Downloads/TarZipFiles/libpng-1.6.37.tar.gz            . 
ln -sf  /home/mimi/wk/WRF/Downloads/TarZipFiles/mpich-3.3.1.tar.gz              . 
ln -sf  /home/mimi/wk/WRF/Downloads/TarZipFiles/netcdf-c-4.9.0.tar.gz           . 
ln -sf  /home/mimi/wk/WRF/Downloads/TarZipFiles/netcdf-fortran-4.6.0.tar.gz     . 
ln -sf  /home/mimi/wk/WRF/Downloads/TarZipFiles/zlib-1.3.tar.gz                 . 
mimi@mimi:~/wk/docker_wrf/downloads$
lrwxrwxrwx 1 mimi mimi   58 12์›” 27 09:57 hdf5-1.10.5.tar.gz -> /home/mimi/wk/WRF/Downloads/TarZipFiles/hdf5-1.10.5.tar.gz
lrwxrwxrwx 1 mimi mimi   70 12์›” 27 09:57 geog_high_res_mandatory.tar.gz -> /home/mimi/wk/WRF/Downloads/TarZipFiles/geog_high_res_mandatory.tar.gz
lrwxrwxrwx 1 mimi mimi   58 12์›” 27 09:57 mpich-3.3.1.tar.gz -> /home/mimi/wk/WRF/Downloads/TarZipFiles/mpich-3.3.1.tar.gz
lrwxrwxrwx 1 mimi mimi   60 12์›” 27 09:57 libpng-1.6.37.tar.gz -> /home/mimi/wk/WRF/Downloads/TarZipFiles/libpng-1.6.37.tar.gz
lrwxrwxrwx 1 mimi mimi   58 12์›” 27 09:57 jasper-1.900.1.zip -> /home/mimi/wk/WRF/Downloads/TarZipFiles/jasper-1.900.1.zip
lrwxrwxrwx 1 mimi mimi   55 12์›” 27 09:57 zlib-1.3.tar.gz -> /home/mimi/wk/WRF/Downloads/TarZipFiles/zlib-1.3.tar.gz
lrwxrwxrwx 1 mimi mimi   67 12์›” 27 09:57 netcdf-fortran-4.6.0.tar.gz -> /home/mimi/wk/WRF/Downloads/TarZipFiles/netcdf-fortran-4.6.0.tar.gz
lrwxrwxrwx 1 mimi mimi   61 12์›” 27 09:57 netcdf-c-4.9.0.tar.gz -> /home/mimi/wk/WRF/Downloads/TarZipFiles/netcdf-c-4.9.0.tar.gz

 

์ ‘์–ด๋‘” ๊ฒƒ๊ณผ ๊ฐ™์ด ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ๋งŒ๋“ค์–ด๋‘๊ณ  ๋นŒ๋“œ ์ง„ํ–‰์‹œ, ์•„๋ž˜์™€ ๊ฐ™์ด ์ •์ƒ์ ์œผ๋กœ ๋„˜์–ด๊ฐ€๋Š”๋ฐ, 

 => [14/18] COPY ./downloads /home/myuser/WRF/Downloads                                                                                                                            0.1s

์œ„์™€ ๊ฐ™์ด COPYํ•œ tarํŒŒ์ผ์„ ํ’€๋ ค๊ณ  ํ•  ๋•Œ, ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค. 

์–ด๋–ป๊ฒŒ ๋ณต์‚ฌ๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•˜๊ณ ์ž.. tar๋กœ ํ‘ธ๋Š” ์ฝ”๋“œ๋ฅผ ์ฃผ์„์ฒ˜๋ฆฌ ํ•˜๊ณ  ์šฐ์„  ๋นŒ๋“œ๋ฅผ ์ง„ํ–‰ํ•ด๋ดค๋‹ค.

 

์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ถ€์— ๋“ค์–ด๊ฐ€์„œ ํ™•์ธํ•ด๋ณด๋‹ˆ, ์›๋ณธํŒŒ์ผ์ด ๋ณต์‚ฌ๋œ๊ฒŒ ์•„๋‹Œ, ๋งํฌ๋œ ํŒŒ์ผ์ด ๋ณต์‚ฌ๋˜์–ด

์›๋ณธ์„ ์ฐพ์ง€ ๋ชปํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— tar๋ฅผ ํ’€๋•Œ ์›๋ณธ ํŒŒ์ผ์„ ์ฐพ์ง€ ๋ชปํ•ด ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒ ํ•œ ๊ฒƒ์ด์—ˆ๋‹ค.


"Docker์—์„œ ์‹ฌ๋ณผ๋ฆญ๋งํฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ, ์ผ๋ฐ˜์ ์œผ๋กœ ๋งํฌ ์ž์ฒด๊ฐ€ ์•„๋‹Œ ๋งํฌ๊ฐ€ ๊ฐ€๋ฆฌํ‚ค๋Š” ์‹ค์ œ ํŒŒ์ผ์ด ์ปจํ…Œ์ด๋„ˆ๋กœ ๋ณต์‚ฌ๋œ๋‹ค."

๋ผ๋Š” ๋ง์€ ํ•ด๋‹น ๋งํฌํŒŒ์ผ์„ ์ง์ ‘ COPYํ•  ๋•Œ ํ•ด๋‹น๋˜๋Š” ๋ง๋กœ ๋ณด์ด๋Š”๊ฒŒ,

๋‚ด๊ฐ€ ์œ„์—์„œ ํ…Œ์ŠคํŠธ ํ•ด๋ณผ ๋•Œ,
์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ /downloads ํ•˜์œ„์— ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋œ ํŒŒ์ผ๋“ค์ด ์žˆ์—ˆ๊ณ , /downloads ๋””๋ ‰ํ„ฐ๋ฆฌ ์ž์ฒด๋ฅผ COPYํ–ˆ์—ˆ๋Š”๋ฐ
COPY ./downloads /home/myuser/WRF/Downloads
์ด ๊ฒฝ์šฐ, ๋นŒ๋“œ๋Š” ์ •์ƒ์ ์œผ๋กœ ์ง„ํ–‰๋˜๊ณ  ์ปจํ…Œ์ด๋„ˆ ์•ˆ์— ์‹ฌ๋ณผ๋ง ๋งํฌ๋œ ํŒŒ์ผ์ด ๋ณต์‚ฌ๋˜์–ด ๋“ค์–ด๊ฐ€์žˆ์—ˆ๊ณ ,

๋‹ค์‹œ ํ…Œ์ŠคํŠธ ํ•ด๋ณผ ๋•Œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ /downloads ํ•˜์œ„์— ์žˆ๋Š” ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ๋œ ํŒŒ์ผ ํ•˜๋‚˜๋ฅผ COPYํ•˜๋ ค๊ณ  ํ–ˆ๋”๋‹ˆ
COPY ./downloads/hdf5-1.10.5.tar.gz /home/myuser/WRF/Downloads
์ดˆ๊ธฐ์— ๋ฐœ์ƒํ•œ ๊ฒƒ๊ณผ ๊ฐ™์ด ํŒŒ์ผ์„ ๋ชป์ฐพ๋Š” ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ  ์žˆ๋‹ค.

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 73ebe1a7-7d4f-4c5c-9793-dab09f746fea::iqkb013a9xmz0rvdt5e0pbz42: "/home/mimi/wk/WRF/Downloads/TarZipFiles/hdf5-1.10.5.tar.gz": not found

 

 

์ด๋ฒˆ์—” ์ƒ๋Œ€๊ฒฝ๋กœ๋กœ ์ง„ํ–‰.. ํ–ˆ๋Š”๋ฐ ๋˜‘๊ฐ™๋‹ค..

๋”๋ณด๊ธฐ
COPY ../../WRF/Downloads/TarZipFiles/geog_high_res_mandatory.tar.gz   /home/myuser/WRF/Downloads/geog_high_res_mandatory.tar.gz
COPY ../../WRF/Downloads/TarZipFiles/hdf5-1.10.5.tar.gz               /home/myuser/WRF/Downloads/hdf5-1.10.5.tar.gz
COPY ../../WRF/Downloads/TarZipFiles/jasper-1.900.1.zip               /home/myuser/WRF/Downloads/jasper-1.900.1.zip
COPY ../../WRF/Downloads/TarZipFiles/libpng-1.6.37.tar.gz             /home/myuser/WRF/Downloads/libpng-1.6.37.tar.gz
COPY ../../WRF/Downloads/TarZipFiles/mpich-3.3.1.tar.gz               /home/myuser/WRF/Downloads/mpich-3.3.1.tar.gz
COPY ../../WRF/Downloads/TarZipFiles/netcdf-c-4.9.0.tar.gz            /home/myuser/WRF/Downloads/netcdf-c-4.9.0.tar.gz
COPY ../../WRF/Downloads/TarZipFiles/netcdf-fortran-4.6.0.tar.gz      /home/myuser/WRF/Downloads/netcdf-fortran-4.6.0.tar.gz
COPY ../../WRF/Downloads/TarZipFiles/zlib-1.3.tar.gz                  /home/myuser/WRF/Downloads/zlib-1.3.tar.gz

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 73ebe1a7-7d4f-4c5c-9793-dab09f746fea::z87jv0muf436jfforyksx8uf1: "/WRF/Downloads/TarZipFiles/zlib-1.3.tar.gz": not found

 

์Œ ์—ญ์‹œ GPT ^^^๐Ÿ˜Š... ๋ชจ๋ฅด๋Š”๊ฑด ๋ชจ๋ฅธ๋‹ค๊ณ  ํ•ด์คฌ์œผ๋ฉด... ๋‚ด๊ฐ€ ๋ชปํ•œ๊ฑธ์ˆ˜๋„ ์žˆ์ง€๋งŒ...

 

 

 

 

๊ทธ๋ž˜์„œ.. ๋‚ด๊ฐ€ ์™œ ์ด๊ฑธ ํ•˜๊ณ  ์žˆ์—ˆ์ง€.........๐Ÿ˜ฉ

๊นƒํ—ˆ๋ธŒ ํ‘ธ์‰ฌํ•˜๋ ค ํ–ˆ๋Š”๋ฐ ์šฉ๋Ÿ‰์ œํ•œ์— ๊ฑธ๋ ธ๋”๋ผ์ง€..

๊ทธ๋Ÿผ ๊ทธ๋ƒฅ ๋„์ปคํŒŒ์ผ ์žˆ๋Š” ๋””๋ ‰ํ„ฐ๋ฆฌ ์•ˆ์— TarZipFiles ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์˜ฎ๊ฒจ๋‘๊ณ .. downloads ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ๋„ฃ์–ด๋‘๊ณ  ๊ด€๋ฆฌํ•˜์ž.. ๊ทธ๋Ÿผ ์›๋ณธ์ด ๋ณต์‚ฌ๋ ํ…Œ๋‹ˆ..

๊ทธ๋ฆฌ๊ณ  ๊นƒํ—ˆ๋ธŒ์—๋Š” TarZipFiles ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ๋ฐ˜์˜ํ•˜์ง€ ์•Š๋„๋ก ignore์„ค์ •ํ•ด๋‘์ž..

 

 

์›๋ณธ์ด ์žˆ๋Š” TarZipFiles๋Š” Dockerfile์ด ์œ„์น˜ํ•œ ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ์˜ฎ๊น€

COPY ํ•  downloads ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ์ƒ๋Œ€๊ฒฝ๋กœ๋กœ ๊ฑธ์–ด๋‘ 

๋”๋ณด๊ธฐ
lrwxrwxrwx 1 mimi mimi   45 12์›” 27 10:31 geog_high_res_mandatory.tar.gz -> ../TarZipFiles/geog_high_res_mandatory.tar.gz
lrwxrwxrwx 1 mimi mimi   33 12์›” 27 10:31 jasper-1.900.1.zip -> ../TarZipFiles/jasper-1.900.1.zip
lrwxrwxrwx 1 mimi mimi   33 12์›” 27 10:31 hdf5-1.10.5.tar.gz -> ../TarZipFiles/hdf5-1.10.5.tar.gz
lrwxrwxrwx 1 mimi mimi   36 12์›” 27 10:31 netcdf-c-4.9.0.tar.gz -> ../TarZipFiles/netcdf-c-4.9.0.tar.gz
lrwxrwxrwx 1 mimi mimi   33 12์›” 27 10:31 mpich-3.3.1.tar.gz -> ../TarZipFiles/mpich-3.3.1.tar.gz
lrwxrwxrwx 1 mimi mimi   35 12์›” 27 10:31 libpng-1.6.37.tar.gz -> ../TarZipFiles/libpng-1.6.37.tar.gz
lrwxrwxrwx 1 mimi mimi   30 12์›” 27 10:31 zlib-1.3.tar.gz -> ../TarZipFiles/zlib-1.3.tar.gz
lrwxrwxrwx 1 mimi mimi   42 12์›” 27 10:31 netcdf-fortran-4.6.0.tar.gz -> ../TarZipFiles/netcdf-fortran-4.6.0.tar.gz

Dockerfile์—์„œ ๋””๋ ‰ํ„ฐ๋ฆฌ ์ž์ฒด๋ฅผ COPYํ–ˆ๋”๋‹ˆ 

๋”๋ณด๊ธฐ
COPY ./downloads /home/myuser/WRF/Downloads

- ์ •์ƒ๋นŒ๋“œ O ์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ถ€์— ๋งํฌ๋กœ ๋ณต์‚ฌ ๋จ 

 

Dockerfile์—์„œ ํŒŒ์ผ ํ•˜๋‚˜ํ•˜๋‚˜๋ฅผ COPYํ–ˆ๋”๋‹ˆ 

๋”๋ณด๊ธฐ
COPY ./downloads/geog_high_res_mandatory.tar.gz   /home/myuser/WRF/Downloads/geog_high_res_mandatory.tar.gz
COPY ./downloads/hdf5-1.10.5.tar.gz               /home/myuser/WRF/Downloads/hdf5-1.10.5.tar.gz
COPY ./downloads/jasper-1.900.1.zip               /home/myuser/WRF/Downloads/jasper-1.900.1.zip
COPY ./downloads/libpng-1.6.37.tar.gz             /home/myuser/WRF/Downloads/libpng-1.6.37.tar.gz
COPY ./downloads/mpich-3.3.1.tar.gz               /home/myuser/WRF/Downloads/mpich-3.3.1.tar.gz
COPY ./downloads/netcdf-c-4.9.0.tar.gz            /home/myuser/WRF/Downloads/netcdf-c-4.9.0.tar.gz
COPY ./downloads/netcdf-fortran-4.6.0.tar.gz      /home/myuser/WRF/Downloads/netcdf-fortran-4.6.0.tar.gz
COPY ./downloads/zlib-1.3.tar.gz                  /home/myuser/WRF/Downloads/zlib-1.3.tar.gz

- ์ •์ƒ๋นŒ๋“œ O ์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ถ€์— ์›๋ณธ ๋ณต์‚ฌ ๋จ

๋”๋ณด๊ธฐ

์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ถ€์—์„œ ํ™•์ธํ•ด ๋ด„

myuser@3bbb5c17aad9:~/WRF/Downloads$ ll
total 2758540
drwxr-xr-x 1 myuser myuser       4096 Dec 27 01:40 ./
drwxr-xr-x 1 myuser myuser       4096 Dec 27 01:41 ../
-rw-rw-r-- 1 root   root   2772782816 Dec 24 08:54 geog_high_res_mandatory.tar.gz
-rw-r--r-- 1 root   root     12030972 Dec 24 08:54 hdf5-1.10.5.tar.gz
-rw-r--r-- 1 root   root      1415752 Jan 19  2007 jasper-1.900.1.zip
-rw-r--r-- 1 root   root      1495748 Apr 14  2019 libpng-1.6.37.tar.gz
-rw-r--r-- 1 root   root     27275466 Jan  7  2022 mpich-3.3.1.tar.gz
-rw-r--r-- 1 root   root      7103958 Jun 10  2022 netcdf-c-4.9.0.tar.gz
-rw-r--r-- 1 root   root      1110214 Jul 29  2022 netcdf-fortran-4.6.0.tar.gz
-rw-rw-r-- 1 root   root      1495873 Aug 18 10:08 zlib-1.3.tar.gz
myuser@3bbb5c17aad9:~/WRF/Downloads$

 

๊ฒฐ๋ก ์€...

Dockerfile์ด ์œ„์น˜ํ•œ ๋””๋ ‰ํ„ฐ๋ฆฌ ์•ˆ์— ์›๋ณธํŒŒ์ผ ๋„ฃ์–ด๋†”์•ผ ํ•จ

git์— update์•ˆ๋˜์—ˆ์œผ๋ฉด ํ•˜๋ฉด ingnore ํŒŒ์ผ ์‚ฌ์šฉ

๋ฒ„์ „๋ณ„๋กœ ์‚ฌ์šฉํ•˜๋Š” ํŒŒ์ผ ๋ณ„๋„๋กœ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด์„œ ์›๋ณธ ํŒŒ์ผ๋“ค์€ TarZipFiles ๋””๋ ‰ํ„ฐ๋ฆฌ์— ๋ชจ์•„๋‘๊ณ , ์‹ค์ œ ์‚ฌ์šฉํ•˜๋Š” ํŒŒ์ผ๋“ค์€ downloads ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋ฅผ ๊ฑธ์–ด์„œ ์‚ฌ์šฉ

 

 

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€