Minwook’s portfolio

docker container geth 설치 본문

Codestates 블록체인 부트캠프 6기

docker container geth 설치

yiminwook 2022. 9. 13. 17:30

 

 

ubuntu 20.04v 기준

 

ubuntu image를 받고 컨테이너를 실행

$sudo docker search ubuntu
$sudo docker pull ubuntu
$sudo docker image ls
$sudo docker create -it --name con_ubuntu ubuntu
$sudo docker start con_ubuntu
$sudo docker ps
$sudo docker attach con_ubuntu //터미널에 컨테이너 연결

 

 

컨테이너 내부 진입

root@8xxxxxxxxxxx:/$apt update -y //초기세팅
root@8xxxxxxxxxxx:/$apt install -y software-properties-common
root@8xxxxxxxxxxx:/$apt-get install -y tzdata //timezonedata install
Configuring tzdata
------------------

Please select the geographic area in which you live. Subsequent configuration questions will narrow
this down by presenting a list of cities, representing the time zones in which they are located.

  1. Africa   3. Antarctica  5. Arctic  7. Atlantic  9. Indian    11. US
  2. America  4. Australia   6. Asia    8. Europe    10. Pacific  12. Etc
Geographic area: 6  //asia지역선택

Please select the city or region corresponding to your time zone.

  1. Aden         19. Chongqing    37. Jerusalem     55. Novokuznetsk   73. Taipei
  2. Almaty       20. Colombo      38. Kabul         56. Novosibirsk    74. Tashkent
  3. Amman        21. Damascus     39. Kamchatka     57. Omsk           75. Tbilisi
  4. Anadyr       22. Dhaka        40. Karachi       58. Oral           76. Tehran
  5. Aqtau        23. Dili         41. Kashgar       59. Phnom_Penh     77. Tel_Aviv
  6. Aqtobe       24. Dubai        42. Kathmandu     60. Pontianak      78. Thimphu
  7. Ashgabat     25. Dushanbe     43. Khandyga      61. Pyongyang      79. Tokyo
  8. Atyrau       26. Famagusta    44. Kolkata       62. Qatar          80. Tomsk
  9. Baghdad      27. Gaza         45. Krasnoyarsk   63. Qostanay       81. Ujung_Pandang
  10. Bahrain     28. Harbin       46. Kuala_Lumpur  64. Qyzylorda      82. Ulaanbaatar
  11. Baku        29. Hebron       47. Kuching       65. Rangoon        83. Urumqi
  12. Bangkok     30. Ho_Chi_Minh  48. Kuwait        66. Riyadh         84. Ust-Nera
  13. Barnaul     31. Hong_Kong    49. Macau         67. Sakhalin       85. Vientiane
  14. Beirut      32. Hovd         50. Magadan       68. Samarkand      86. Vladivostok
  15. Bishkek     33. Irkutsk      51. Makassar      69. Seoul          87. Yakutsk
  16. Brunei      34. Istanbul     52. Manila        70. Shanghai       88. Yangon
  17. Chita       35. Jakarta      53. Muscat        71. Singapore      89. Yekaterinburg
  18. Choibalsan  36. Jayapura     54. Nicosia       72. Srednekolymsk  90. Yerevan
Time zone: 69       //seoul을 선택


Current default time zone: 'Asia/Seoul'
Local time is now:      Tue Sep 13 17:15:12 KST 2022.
Universal Time is now:  Tue Sep 13 08:15:12 UTC 2022.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

root@8xxxxxxxxxxx:/$ date //현재시간확인
Tue Sep 13 17:15:26 KST 2022
root@8xxxxxxxxxxx:/$

date를 터미널에 입력시 현재시간이 utc가아닌 kst가 출력된다면

정상적으로  timezone 설정이 된 것이다.

 

 

root@8xxxxxxxxxxx:/$add-apt-repostory ppa:ethereum/ethereum //실행후 엔터입력
root@8xxxxxxxxxxx:/$apt-get install vim -y
root@8xxxxxxxxxxx:/$apt update -y && apt install geth
root@8xxxxxxxxxxx:/$apt-get install git -y
root@8xxxxxxxxxxx:/$cd ~
root@8xxxxxxxxxxx:/$git clone http://github.com/ethereum/go-ethereum
root@8xxxxxxxxxxx:/$apt-get install -y build-essential golang

root@8xxxxxxxxxxx:/$get version //geth버전확인

 

 


 

 

참고

https://stynxh.github.io/2020-07-26-set-timezone-when-ubuntu-docker-image-build/

 

 

 

 

 

 

 

 

Comments