2020/12,江端さんの技術メモ

Tile38

Slack Channel Docker Ready

Tile38 is an open source (MIT licensed), in-memory geolocation data store, spatial index, and realtime geofence. It supports a variety of object types including lat/lon points, bounding boxes, XYZ tiles, Geohashes, and GeoJSON.

Tile38は、オープンソース(MITライセンス)で、インメモリのジオロケーションデータストア、空間インデックス、リアルタイムジオフェンスです。緯度/経度ポイント、バウンディングボックス、XYZタイル、Geohash、GeoJSONを含む様々なオブジェクトタイプをサポートしています。

This README is quick start document. You can find detailed documentation at https://tile38.com.

このREADMEはクイックスタートのドキュメントです。詳細なドキュメントはhttps://tile38.com.

Nearby Within Intersects Geofencing Roaming Geofences

Features

特徴

Components

  • tile38-server - The server → サーバ
  • tile38-cli - Command line interface tool → コマンドインターフェースツール
  • tile38-benchmark - Server benchmark tool → サーバベンチマークツール

Getting Started

はじめに

Getting Tile38

タイル38の取得

Perhaps the easiest way to get the latest Tile38 is to use one of the pre-built release binaries which are available for OSX, Linux, FreeBSD, and Windows. Instructions for using these binaries are on the GitHub releases page. → 最新のTile38を入手する最も簡単な方法は、OSX、Linux、FreeBSD、Windows用に提供されているビルド済みのリリースバイナリを使用することでしょう。これらのバイナリの使い方は、GitHub release pageにあります。

Docker

To run the latest stable version of Tile38:→Tile38の最新の安定版を実行する。

docker pull tile38/tile38
docker run -p 9851:9851 tile38/tile38

Visit the Tile38 hub page for more information. → 詳しくはTile38ハブページをご覧ください。

Homebrew (macOS)

Install Tile38 using Homebrew →Homebrew](https://brew.sh/)を使ってTile38をインストールします。

brew install tile38
tile38-server

Building Tile38

タイル38の構築

Tile38 can be compiled and used on Linux, OSX, Windows, FreeBSD, and probably others since the codebase is 100% Go. We support both 32 bit and 64 bit systems. Go must be installed on the build machine.

Tile38は、コードベースが100%Goなので、Linux、OSX、Windows、FreeBSD、そしておそらく他のOSでもコンパイルして使うことができます。32ビットと64ビットの両方をサポートしています。ビルドマシンにはGoがインストールされている必要があります。

To build everything simply:

すべてをシンプルに構築する為に

$ make

To test:

$ make test

Running

実行

For command line options invoke: コマンドラインオプションの場合は、次を呼び出します。

$ ./tile38-server -h

To run a single server:

$ ./tile38-server

# The tile38 shell connects to localhost:9851
$ ./tile38-cli
> help

Playing with Tile38

Basic operations: 基本操作:

$ ./tile38-cli

# add a couple of points named 'truck1' and 'truck2' to a collection named 'fleet'.
#「fleet」という名前のコレクションに「truck1」および「truck2」という名前のポイントをいくつか追加します。
> set fleet truck1 point 33.5123 -112.2693   # on the Loop 101 in Phoenix
> set fleet truck2 point 33.4626 -112.1695   # on the I-10 in Phoenix

# search the 'fleet' collection.
#「フリート」コレクションを検索します。
> scan fleet                                 # returns both trucks in 'fleet'
> nearby fleet point 33.462 -112.268 6000    # search 6 kilometers around a point. returns one truck.

# key value operations
# キー値操作
> get fleet truck1                           # returns 'truck1'
> del fleet truck2                           # deletes 'truck2'
> drop fleet                                 # removes all 

Tile38 has a ton of great commands. Tile38にはたくさんの[すばらしいコマンド](https://tile38.com/commands)があります。

Fields

フィールド

Fields are extra data that belongs to an object. A field is always a double precision floating point. There is no limit to the number of fields that an object can have.

フィールドは、オブジェクトに属する追加のデータです。 フィールドは常に倍精度浮動小数点です。 オブジェクトが持つことができるフィールドの数に制限はありません。

To set a field when setting an object: オブジェクトを設定するときにフィールドを設定するには:

> set fleet truck1 field speed 90 point 33.5123 -112.2693             
> set fleet truck1 field speed 90 field age 21 point 33.5123 -112.2693

To set a field when an object already exists: オブジェクトがすでに存在するときにフィールドを設定するには:

> fset fleet truck1 speed 90

Searching

検索

Tile38 has support to search for objects and points that are within or intersects other objects. All object types can be searched including Polygons, MultiPolygons, GeometryCollections, etc.

Tile38は、他のオブジェクト内または他のオブジェクトと交差するオブジェクトおよびポイントの検索をサポートしています。 Polygons、MultiPolygons、GeometryCollectionsなどを含むすべてのオブジェクトタイプを検索できます。

Search Within

Within

WITHIN searches a collection for objects that are fully contained inside a specified bounding area. WITHINは、指定された境界領域内に完全に含まれているオブジェクトをコレクションで検索します。

Search Intersects

Intersects

INTERSECTS searches a collection for objects that intersect a specified bounding area.

Search Nearby

Nearby

NEARBY searches a collection for objects that intersect a specified radius. INTERSECTSは、指定された境界領域と交差するオブジェクトをコレクションで検索します。

Search options

検索オプション

SPARSE - This option will distribute the results of a search evenly across the requested area.

** SPARSE **-このオプションは、検索結果を要求された領域全体に均等に分散します。

This is very helpful for example; when you have many (perhaps millions) of objects and do not want them all clustered together on a map. Sparse will limit the number of objects returned and provide them evenly distributed so that your map looks clean.

これは、非常に役立ちます。 多数(おそらく数百万)のオブジェクトがあり、それらすべてをマップ上にクラスター化したくない場合。 スパースは、返されるオブジェクトの数を制限し、マップがきれいに見えるようにそれらを均等に分散させます。

You can choose a value between 1 and 8. The value 1 will result in no more than 4 items. The value 8 will result in no more than 65536. 1=4, 2=16, 3=64, 4=256, 5=1024, 6=4098, 7=16384, 8=65536.

1から8までの値を選択できます。値1は、4つ以下のアイテムになります。 値8は、65536以下になります。* 1 = 4、2 = 16、3 = 64、4 = 256、5 = 1024、6 = 4098、7 = 16384、8 =65536。*

>

No SparsingSearch WithinSparse 1Search WithinSparse 2Search WithinSparse 3Search WithinSparse 4Search WithinSparse 5Search Within

Please note that the higher the sparse value, the slower the performance. Also, LIMIT and CURSOR are not available when using SPARSE.

スパース値が高いほど、パフォーマンスが低下することに注意してください。 また、SPARSEを使用している場合、LIMITとCURSORは使用できません。

WHERE - This option allows for filtering out results based on field values. For example
nearby fleet where speed 70 +inf point 33.462 -112.268 6000 will return only the objects in the 懼fleet懼 collection that are within the 6 km radius and have a field named speed that is greater than 70.

Multiple WHEREs are concatenated as and clauses. WHERE speed 70 +inf WHERE age -inf 24 would be interpreted as speed is over 70 and age is less than 24.

The default value for a field is always 0. Thus if you do a WHERE on the field speed and an object does not have that field set, the server will pretend that the object does and that the value is Zero.

WHERE - このオプションは、fieldの値に基づいて結果をフィルタリングすることができます。例えば
`nearby fleet where speed 70 +inf point 33.462 -112.268 6000````は、半径6km以内にあるオブジェクトのみを返します。<br><br>複数のWHEREは**and**句として連結されます。<br><br>フィールドのデフォルト値は常に0です。したがって、フィールドspeed` の WHERE を実行したときに、オブジェクトにそのフィールドが設定されていない場合、サーバーはオブジェクトが設定されていて、その値がゼロであるかのように振舞うことになります。

MATCH - MATCH is similar to WHERE except that it works on the object id instead of fields.
nearby fleet match truck* point 33.462 -112.268 6000 will return only the objects in the 懼fleet懼 collection that are within the 6 km radius and have an object id that starts with truck. There can be multiple MATCH options in a single search. The MATCH value is a simple glob pattern.

nearby fleet match truck* point 33.462 -112.268 6000は、半径6km以内にある懼fリート懼コレクションのオブジェクトのうち、かつtruckで始まるオブジェクトIDを持つものだけを返します。1つの検索で複数のMATCHオプションを指定することができます。MATCHの値は単純なglob patternです。

CURSOR - CURSOR is used to iterate though many objects from the search results. An iteration begins when the CURSOR is set to Zero or not included with the request, and completes when the cursor returned by the server is Zero.

CURSOR - CURSORは、検索結果から多くのオブジェクトを繰り返し処理するために使用されます。CURSORが0に設定されているか、リクエストに含まれていない場合には反復処理が開始され、サーバから返されたカーソルが0になった時点で終了します。

NOFIELDS - NOFIELDS tells the server that you do not want field values returned with the search results.

NOFIELDS - NOFIELDSは、検索結果で返されるフィールド値を望まないことをサーバーに伝えます。

LIMIT - LIMIT can be used to limit the number of objects returned for a single search request.

LIMIT - LIMITは、1つの検索リクエストに対して返されるオブジェクトの数を制限するために使用することができます。

Geofencing

ジオフェンシング

Geofence animation A geofence is a virtual boundary that can detect when an object enters or exits the area. This boundary can be a radius, bounding box, or a polygon. Tile38 can turn any standard search into a geofence monitor by adding the FENCE keyword to the search.

ジオフェンスは、物体がその領域に入ったり出たりしたときに検出できる仮想的な境界です。この境界は、半径、境界ボックス、または多角形にすることができます。Tile38は、検索にFENCEキーワードを追加することで、標準的な検索をジオフェンスモニタに変えることができます。

Tile38 also allows for Webhooks to be assigned to Geofences.

*Tile38では、ジオフェンスにWebhooksを割り当てることもできます。

 

A simple example:

簡単な例です。

> nearby fleet fence point 33.462 -112.268 6000

This command opens a geofence that monitors the 懼fleet懼 collection. The server will respond with:

このコマンドは 懼fリート懼 コレクションを監視するジオフェンスを開きます。サーバは以下のように応答します。

{"ok":true,"live":true}

And the connection will be kept open. If any object enters or exits the 6 km radius around 33.462,-112.268 the server will respond in realtime with a message such as:

また、接続はオープンに保たれます。33.462,-112.268` 付近の半径6kmの範囲に何か物体が出入りすると、サーバはリアルタイムで次のようなメッセージを返します。

{"command":"set","detect":"enter","id":"truck02","object":{"type":"Point","coordinates":[-112.2695,33.4626]}}

The server will notify the client if the command is del | set | drop.

サーバは commanddel | set | drop の場合にクライアントに通知する。

  • del notifies the client that an object has been deleted from the collection that is being fenced.
  • del` は、フェンシングされているコレクションからオブジェクトが削除されたことをクライアントに通知します。
  • drop notifies the client that the entire collection is dropped.
  • drop` はコレクション全体が削除されたことをクライアントに通知する。
  • set notifies the client that an object has been added or updated, and when it懼s position is detected by the fence.
  • set` はオブジェクトが追加または更新されたことをクライアントに通知し、フェンスによってその位置が検出されたときにそのことを通知します。

The detect may be one of the following values.

detect` は以下の値のいずれかである。

  • inside is when an object is inside the specified area.
  • inside` はオブジェクトが指定された領域の内側にあるときのことである。
  • outside is when an object is outside the specified area.
  • outside` は、オブジェクトが指定された領域の外にあるときのことである。
  • enter is when an object that was not previously in the fence has entered the area.
  • enter`は、それまで柵の中に**なかったオブジェクトがエリア内に入ってきたときのことである。
  • exit is when an object that was previously in the fence has exited the area.
  • exit`は、以前にフェンスの中にあった***オブジェクトがエリア外に出たときのことである。
  • cross is when an object that was not previously in the fence has entered and exited the area.
  • クロス`とは、それまで柵の中になかったオブジェクトがエリアに入ってきて**エリアから出てきたときのことである。

These can be used when establishing a geofence, to pre-filter responses. For instance, to limit responses to enter and exit detections:

これらは、ジオフェンスを確立する際に、応答を事前にフィルタリングするために使用することができます。例えば、enterexit の検出に対して応答を制限することができます。

> nearby fleet fence detect enter,exit point 33.462 -112.268 6000

Pub/sub channels

パブ/サブチャンネル

Tile38 supports delivering geofence notications over pub/sub channels.

Tile38は、パブ/サブチャンネル上のジオフェンス通知の配信をサポートしています。

To create a static geofence that sends notifications when a bus is within 200 meters of a point and sends to the busstop channel:

バスがポイントから200メートル以内にいるときに通知を送信し、busstopチャンネルに送信する静的ジオフェンスを作成します。

> setchan busstop nearby buses fence point 33.5123 -112.2693 200

Subscribe on the busstop channel:

バストップチャンネルを購読してください。

> subscribe busstop

Object types

オブジェクトの種類

All object types except for XYZ Tiles and QuadKeys can be stored in a collection. XYZ Tiles and QuadKeys are reserved for the SEARCH keyword only.

XYZ TilesとQuadKeyを除くすべてのオブジェクトタイプは、コレクションに格納することができます。XYZ TilesとQuadKeyは、SEARCHキーワードのみに予約されています。

Lat/lon point

ラット/ロングポイント

The most basic object type is a point that is composed of a latitude and a longitude. There is an optional z member that may be used for auxiliary data such as elevation or a timestamp.

最も基本的なオブジェクト型は緯度と経度からなる点である。オプションの z メンバがあり、標高やタイムスタンプなどの補助データに使用することができます。

set fleet truck1 point 33.5123 -112.2693     # plain lat/lon
set fleet truck1 point 33.5123 -112.2693 225 # lat/lon with z member

Bounding box

バウンディングボックス

A bounding box consists of two points. The first being the southwestern most point and the second is the northeastern most point.

バウンディングボックスは2つの点で構成されています。1つ目は最も南西の点で、2つ目は最も北東の点です。

set fleet truck1 bounds 30 -110 40 -100

Geohash

ジオハッシュ

A geohash is a string representation of a point. With the length of the string indicating the precision of the point.

geohash は、点を文字列で表現したものです。文字列の長さは点の精度を表します。

set fleet truck1 hash 9tbnthxzr # this would be equivalent to 'point 33.5123 -112.2693'

GeoJSON

GeoJSON is an industry standard format for representing a variety of object types including a point, multipoint, linestring, multilinestring, polygon, multipolygon, geometrycollection, feature, and featurecollection.

GeoJSON](https://tools.ietf.org/html/rfc7946)は、点、多点、線条、多線条、多角形、マルチポリゴン、ジオメトリコレクション、フィーチャ、フィーチャコレクションなど、様々なオブジェクトタイプを表現するための業界標準フォーマットです。

* All ignored members will not persist.

* すべての無視されたメンバーは持続しません。

Important to note that all coordinates are in Longitude, Latitude order.

すべての座標は経度、緯度の順になっていることに注意してください。

set city tempe object {"type":"Polygon","coordinates":[[[0,0],[10,10],[10,0],[0,0]]]}

XYZ Tile

XYZタイル

An XYZ tile is rectangle bounding area on earth that is represented by an X, Y coordinate and a Z (zoom) level.

XYZタイルとは、X,Y座標とZ(ズーム)レベルで表現された地球上の矩形領域のことです。

Check out maptiler.org for an interactive example.

インタラクティブな例は maptiler.org をご覧ください。

QuadKey

A QuadKey used the same coordinate system as an XYZ tile except that the string representation is a string characters composed of 0, 1, 2, or 3. For a detailed explanation checkout The Bing Maps Tile System.

QuadKey は XYZ タイルと同じ座標系を使用しますが、文字列表現は 0, 1, 2, 3 で構成される文字列です。詳しい説明は Bing Maps Tile System をご覧ください。

Network protocols

ネットワークプロトコル

It懼s recommended to use a client library or the Tile38 CLI, but there are times when only HTTP is available or when you need to test from a remote terminal. In those cases we provide an HTTP and telnet options.

クライアントライブラリ](#client-libraries)またはTile38 CLIを使用することをお勧めしますが、HTTPしか利用できない場合や、リモート端末からテストする必要がある場合があります。そのような場合には、HTTPとtelnetオプションを用意しています。

HTTP

One of the simplest ways to call a tile38 command is to use HTTP. From the command line you can use curl. For example:

tile38コマンドを呼び出す最も簡単な方法の1つは、HTTPを使用することです。コマンドラインからcurlを使用することができます。例えば、以下のようになります。

# call with request in the body
curl --data "set fleet truck3 point 33.4762 -112.10923" localhost:9851

# call with request in the url path
curl localhost:9851/set+fleet+truck3+point+33.4762+-112.10923

Websockets

ウェブソケット

Websockets can be used when you need to Geofence and keep the connection alive. It works just like the HTTP example above, with the exception that the connection stays alive and the data is sent from the server as text websocket messages.

Websocket は、ジオフェンスして接続を維持する必要がある場合に使用することができます。これは上記の HTTP の例と同じように動作しますが、接続が生きていることと、データがテキストの Websocket メッセージとしてサーバーから送信されることを除いては、動作しません。

Telnet

There is the option to use a plain telnet connection. The default output through telnet is RESP.

プレーンなtelnet接続を使用するオプションがあります。telnetによるデフォルトの出力はRESPです。

telnet localhost 9851
set fleet truck3 point 33.4762 -112.10923
+OK

The server will respond in JSON or RESP depending on which protocol is used when initiating the first command.

サーバは、最初のコマンドを開始するときに使用されるプロトコルに応じて、JSONまたはRESPで応答します。

  • HTTP and Websockets use JSON.
  • HTTPとWebsocketsはJSONを使用しています。
  • Telnet and RESP clients use RESP.
  • Telnet と RESP クライアントは RESP を使用します。

Client Libraries

クライアントライブラリ

Tile38 uses the Redis RESP protocol natively. Therefore most clients that support basic Redis commands will in turn support Tile38. Below are a few of the popular clients.

Tile38はRedis RESPプロトコルをネイティブに使用します。そのため、基本的なRedisコマンドをサポートしているほとんどのクライアントがTile38をサポートしています。以下に人気のあるクライアントをいくつか紹介します。

Contact

連絡先

Josh Baker [@tidwall](https://twitter.com/tidwall)

License

ライセンス

Tile38 source code is available under the MIT License.

Tile38のソースコードはMIT Licenseで公開されています。

2020/11,江端さんの技術メモ

「無理せんと、リバースプロキシ(nginx)使えば?」

で、nginxで、外向きにはhttps, 内側はhttpという nginx.confを作りました。

今回は、nginxがdockerのコンテナですでに稼動中のプログラムで、これを試してみました。

まず、docker-compose.ymlですが、まず、docker-compose.ymlと同じディレクトリに、algo.crtとalgo.keyを放り込んでおいて、portsとvolumesを以下のように変更します。

(前略)
nginx:
    image: nginx:1.15-alpine
    ports:
      - "80:80"    ←ここ      
      - "443:443"   ←ここ      
    links:
      - app:app
    volumes:
      - "./nginx.conf:/etc/nginx/conf.d/default.conf"
      - "./algo.crt:/etc/nginx/conf.d/algo.crt"  ←ここ  
      - "./algo.key:/etc/nginx/conf.d/algo.key"  ←ここ  

portsは、"443:80"と記載するのが正解じゃないかなーと思うのですが、上手く動かなかったので、理由は不明ですが上記のように記載しました。

最後の2行ですが、これはnginxのdockerのコンポーネントの中に強制的にリンクするものらしいのです。少なくとも、dockerのコンポーネントの中に、/etc/nginx/conf.d/ は存在しているようなので、もう適当に、そこにリンクを張ることにしました。(いや、"docker container exec -it nginx_1 sh "等で、コンテナに入って確認すれば良いですが、なんか上手く入れないことがありましてですね)

また、docker-compose.ymlと同じディレクトリに(最初から)入っている、nginx.confを以下のよう改造します。

server { 
 listen 80 default_server;  ←ここ   listen [::]:80 default_server;  ←ここ   return 301 https://$host$request_uri;  ←ここ   } server {  # listen 80 default_server; # listen [::]:80 default_server; listen 443; ←ここ server_name localhost; ←ここ ssl on; ←ここ ssl_certificate /etc/nginx/conf.d/algo.crt; ←ここ # https://wp.kobore.net/2020/09/post-1124/で作ったもの ssl_certificate_key /etc/nginx/conf.d/algo.key; ←ここ # 同上  client_max_body_size 1M; root /go/hitachi_ride_hailing_go/static; # これが良く分からんのだが (app_1の方のディレクトリみたいなんだよなぁ)  location / { index index.html index.htm; proxy_pass_header Server; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; if (!-f $request_filename) { proxy_pass http://app:8000; } } location /ws { proxy_pass http://app:8000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Frame-Options SAMEORIGIN; # リバースプロキシするサーバーから応答が無くとも、接続を切断しない上限の秒数 # http://zaiste.net/2014/12/nginx_websockets_proxy_for_nodejs/ proxy_read_timeout 86400; } }

なんだか分からんけど、太線(←ここ)の所を直したら、https://で通信できるようになったみたいです。

(多分、静的なhtmlファイルの表示だけなら問題はないでしょう)。

あ、忘れていましたが、

JSONのデータを直接受けるhtmlファイルを作成している途中の件

の問題も発生するようなので、面倒なら、"Cross Domain - CORS"を起動しておくと良いでしょう(終了したら取り外しておかないと、Twitterで通信障害「"問題が発生しました" “やりなおす"」が発生するので注意のこと)

ただ、私が現状、https化を試みているプログラムは、まだ問題が残っていて、全部は動いていません。

 

build.9a271f4.js:23 WebSocket connection to 'ws://localhost/ws' failed: Error during WebSocket handshake: Unexpected response code: 301
value @ build.9a271f4.js:23

の方は直接、ws:// → wss://に 書き換えたりとかやっていんだけど、上手く動かないみたいです。

=======

翌日、動いていました。

こういう原因が分からない起動も、厄介です。

2020/10,江端さんの技術メモ

のページをそのまま(ではない)実行

その他の参考メモ

「ブロックチェーン・プログラミング」を読む (bitcoinツールの導入)

Bitcoin Coreを触りながらBitcoinについて理解する - その1(構築~アドレス生成まで)

Bitcoin Bitcoin Core RPC command practice

Dockerをはじめからていねいに?インストールとcentos起動・停止?

C:\Users\ebata\bitcoin>docker-compose build
daemon_two uses an image, skipping
daemon_three uses an image, skipping
Building daemon_one

Traceback (most recent call last):
  File "compose\cli\main.py", line 67, in main
  File "compose\cli\main.py", line 126, in perform_command
  File "compose\cli\main.py", line 302, in build
  File "compose\project.py", line 468, in build
  File "compose\project.py", line 450, in build_service
  File "compose\service.py", line 1147, in build
compose.service.BuildError: (<Service: daemon_one>, {'message': 'Cannot locate specified Dockerfile: Dockerfile'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose\cli\main.py", line 78, in main
TypeError: can only concatenate str (not "dict") to str
[2852] Failed to execute script docker-compose

C:\Users\ebata\bitcoin>dir
 ドライブ C のボリューム ラベルがありません。
 ボリューム シリアル番号は C8D7-CF4A です

 C:\Users\ebata\bitcoin のディレクトリ

2020/10/17  15:28    <DIR>          .
2020/10/17  15:28    <DIR>          ..
2020/10/17  15:28               581 docker-compose.yml
2020/10/17  15:26               436 Dockerfile.txt
               2 個のファイル               1,017 バイト
               2 個のディレクトリ  359,417,462,784 バイトの空き領域

version: "2"
services:
  daemon_one:
    build: "./"
    image: "bitcoind:regtest"
    container_name: 'bitcoin_1'
    hostname: 'bitcoin_1'
    environment:
      - LINE=50
      - COLUMNS=120
    tty: true
    stdin_open: true
    links:
      - daemon_two
      - daemon_three
  daemon_two:
    image: "bitcoind:regtest"
    container_name: 'bitcoin_2'
    hostname: 'bitcoin_2'
    tty: true
    stdin_open: true
  daemon_three:
    image: "bitcoind:regtest"
    container_name: 'bitcoin_3'
    hostname: 'bitcoin_3'
    tty: true
    stdin_open: true
FROM ubuntu:16.04
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y python-software-properties
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:luke-jr/bitcoincore
RUN apt-get update -y
RUN apt-get install -y bitcoind
RUN mkdir ~/.bitcoin
RUN echo "rpcuser=test\nrpcpassword=test\nregtest=1" > ~/.bitcoin/bitcoin.conf
RUN apt-get install iputils-ping net-tools vim -y
CMD ["/bin/bash"]


C:\Users\ebata\bitcoin>mv Dockerfile.txt Dockerfile 
C:\Users\ebata\bitcoin>ls Dockerfile docker-compose.yml 
C:\Users\ebata\bitcoin>docker-compose build daemon_two uses an image, skipping daemon_three uses an image, skipping Building daemon_one 
Step 1/11 : FROM ubuntu:16.04 16.04: Pulling from library/ubuntu 4f53fa4d2cf0: Pull complete 6af7c939e38e: Pull complete 903d0ffd64f6: Pull complete 04feeed388b7: Pull complete Digest: sha256:185fec2d6dbe9165f35e4a1136b4cf09363b328d4f850695393ca191aa1475fd Status: Downloaded newer image for ubuntu:16.04 ---> 096efd74bb89 
Step 2/11 : RUN apt-get update -y && apt-get upgrade -y ---> Running in 3d458b9249b5 
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB] 
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB] 
Get:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [1835 kB] 
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB] 
Get:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] 
Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB] 
Get:7 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [15.9 kB] 
Get:8 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB] 
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [951 kB] 
Get:10 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB] 
Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [9249 B] 
Get:12 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB] 
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [2350 kB] 
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [16.4 kB] 
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1496 kB] 
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [26.7 kB] 
Get:17 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [10.9 kB] 
Get:18 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [12.6 kB] 
Fetched 18.9 MB in 1min 1s (305 kB/s) Reading package lists... 
Reading package lists... 
Building dependency tree... 
Reading state information... 
Calculating upgrade... 
The following packages will be upgraded: libpam-modules libpam-modules-bin libpam-runtime libpam0g 4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 375 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpam0g amd64 1.1.8-3.2ubuntu2.3 [55.7 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpam-modules-bin amd64 1.1.8-3.2ubuntu2.3 [36.9 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpam-modules amd64 1.1.8-3.2ubuntu2.3 [244 kB] Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpam-runtime all 1.1.8-3.2ubuntu2.3 [37.8 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 375 kB in 2s (160 kB/s) (Reading database ... 4780 files and directories currently installed.) Preparing to unpack .../libpam0g_1.1.8-3.2ubuntu2.3_amd64.deb ... Unpacking libpam0g:amd64 (1.1.8-3.2ubuntu2.3) over (1.1.8-3.2ubuntu2.1) ... Processing triggers for libc-bin (2.23-0ubuntu11.2) ... Setting up libpam0g:amd64 (1.1.8-3.2ubuntu2.3) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Processing triggers for libc-bin (2.23-0ubuntu11.2) ... (Reading database ... 4780 files and directories currently installed.) Preparing to unpack .../libpam-modules-bin_1.1.8-3.2ubuntu2.3_amd64.deb ... Unpacking libpam-modules-bin (1.1.8-3.2ubuntu2.3) over (1.1.8-3.2ubuntu2.1) ... Setting up libpam-modules-bin (1.1.8-3.2ubuntu2.3) ... (Reading database ... 4780 files and directories currently installed.) Preparing to unpack .../libpam-modules_1.1.8-3.2ubuntu2.3_amd64.deb ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Unpacking libpam-modules:amd64 (1.1.8-3.2ubuntu2.3) over (1.1.8-3.2ubuntu2.1) ... Setting up libpam-modules:amd64 (1.1.8-3.2ubuntu2.3) ... (Reading database ... 4780 files and directories currently installed.) Preparing to unpack .../libpam-runtime_1.1.8-3.2ubuntu2.3_all.deb ... Unpacking libpam-runtime (1.1.8-3.2ubuntu2.3) over (1.1.8-3.2ubuntu2.1) ... Setting up libpam-runtime (1.1.8-3.2ubuntu2.3) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Removing intermediate container 3d458b9249b5 ---> f00188bd821c Step 3/11 : RUN apt-get install -y python-software-properties ---> Running in b4f5db0d4277 Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: ca-certificates cron dbus dh-python distro-info-data file gir1.2-glib-2.0 iso-codes krb5-locales libapt-inst2.0 libasn1-8-heimdal libcap-ng0 libcurl3-gnutls libdbus-1-3 libdbus-glib-1-2 libexpat1 libffi6 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libgmp10 libgnutls30 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libicu55 libidn11 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libmagic1 libmpdec2 libnettle6 libp11-kit0 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.5-minimal libpython3.5-stdlib libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libsqlite3-0 libssl1.0.0 libtasn1-6 libwind0-heimdal libxml2 lsb-release mime-support openssl powermgmt-base python python-apt python-apt-common python-minimal python-pycurl python2.7 python2.7-minimal python3 python3-apt python3-dbus python3-gi python3-minimal python3.5 python3.5-minimal sgml-base shared-mime-info ucf unattended-upgrades xdg-user-dirs xml-core xz-utils Suggested packages: anacron logrotate checksecurity exim4 | postfix | mail-transport-agent dbus-user-session | dbus-x11 libdpkg-perl isoquery gnutls-bin krb5-doc krb5-user libsasl2-modules-otp libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal lsb python-doc python-tk python-apt-dbg python-apt-doc libcurl4-gnutls-dev python-pycurl-dbg python-pycurl-doc python2.7-doc binutils binfmt-support python3-doc python3-tk python3-venv python3-apt-dbg python-dbus-doc python3-dbus-dbg python3.5-venv python3.5-doc sgml-base-doc bsd-mailx default-mta | mail-transport-agent needrestart debhelper The following NEW packages will be installed: ca-certificates cron dbus dh-python distro-info-data file gir1.2-glib-2.0 iso-codes krb5-locales libapt-inst2.0 libasn1-8-heimdal libcap-ng0 libcurl3-gnutls libdbus-1-3 libdbus-glib-1-2 libexpat1 libffi6 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data libgmp10 libgnutls30 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libicu55 libidn11 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libmagic1 libmpdec2 libnettle6 libp11-kit0 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.5-minimal libpython3.5-stdlib libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libsqlite3-0 libssl1.0.0 libtasn1-6 libwind0-heimdal libxml2 lsb-release mime-support openssl powermgmt-base python python-apt python-apt-common python-minimal python-pycurl python-software-properties python2.7 python2.7-minimal python3 python3-apt python3-dbus python3-gi python3-minimal python3.5 python3.5-minimal sgml-base shared-mime-info ucf unattended-upgrades xdg-user-dirs xml-core xz-utils 0 upgraded, 83 newly installed, 0 to remove and 0 not upgraded. Need to get 27.9 MB of archives. After this operation, 128 MB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 cron amd64 3.0pl1-128ubuntu2 [68.4 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl1.0.0 amd64 1.0.2g-1ubuntu4.17 [1082 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython3.5-minimal amd64 3.5.2-2ubuntu0~16.04.12 [524 kB] Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libexpat1 amd64 2.1.0-7ubuntu0.16.04.5 [71.5 kB] Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3.5-minimal amd64 3.5.2-2ubuntu0~16.04.12 [1598 kB] Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 python3-minimal amd64 3.5.1-3 [23.3 kB] Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 mime-support all 3.59ubuntu1 [31.0 kB] Get:8 http://archive.ubuntu.com/ubuntu xenial/main amd64 libmpdec2 amd64 2.4.2-1 [82.6 kB] Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsqlite3-0 amd64 3.11.0-1ubuntu1.5 [398 kB] Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython3.5-stdlib amd64 3.5.2-2ubuntu0~16.04.12 [2131 kB] Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3.5 amd64 3.5.2-2ubuntu0~16.04.12 [165 kB] Get:12 http://archive.ubuntu.com/ubuntu xenial/main amd64 libpython3-stdlib amd64 3.5.1-3 [6818 B] Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 dh-python all 2.20151103ubuntu1.2 [73.9 kB] Get:14 http://archive.ubuntu.com/ubuntu xenial/main amd64 python3 amd64 3.5.1-3 [8710 B] Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 libffi6 amd64 3.2.1-4 [17.8 kB] Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-0 amd64 2.48.2-0ubuntu4.6 [1120 kB] Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 sgml-base all 1.26+nmu4ubuntu1 [12.5 kB] Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.13 [337 kB] Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.13 [1259 kB] Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-minimal amd64 2.7.12-1~16.04 [28.1 kB] Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.13 [1886 kB] Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.13 [224 kB] Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-stdlib amd64 2.7.12-1~16.04 [7768 B] Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python amd64 2.7.12-1~16.04 [137 kB] Get:25 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 distro-info-data all 0.28ubuntu0.14 [4674 B] Get:26 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmagic1 amd64 1:5.25-2ubuntu1.4 [216 kB] Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 file amd64 1:5.25-2ubuntu1.4 [21.2 kB] Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapt-inst2.0 amd64 1.2.32ubuntu0.1 [54.5 kB] Get:29 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgmp10 amd64 2:6.1.0+dfsg-2 [240 kB] Get:30 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libnettle6 amd64 3.2-1ubuntu0.16.04.1 [93.5 kB] Get:31 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libhogweed4 amd64 3.2-1ubuntu0.16.04.1 [136 kB] Get:32 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libidn11 amd64 1.32-3ubuntu1.2 [46.5 kB] Get:33 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libp11-kit0 amd64 0.23.2-5~ubuntu16.04.1 [105 kB] Get:34 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtasn1-6 amd64 4.7-3ubuntu0.16.04.3 [43.5 kB] Get:35 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgnutls30 amd64 3.4.10-4ubuntu1.8 [548 kB] Get:36 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 lsb-release all 9.20160110ubuntu0.2 [11.8 kB] Get:37 http://archive.ubuntu.com/ubuntu xenial/main amd64 ucf all 3.0036 [52.9 kB] Get:38 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 openssl amd64 1.0.2g-1ubuntu4.17 [492 kB] Get:39 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 ca-certificates all 20190110~16.04.1 [146 kB] Get:40 http://archive.ubuntu.com/ubuntu xenial/main amd64 libcap-ng0 amd64 0.7.7-1 [10.9 kB] Get:41 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdbus-1-3 amd64 1.10.6-1ubuntu3.6 [161 kB] Get:42 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 dbus amd64 1.10.6-1ubuntu3.6 [141 kB] Get:43 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgirepository-1.0-1 amd64 1.46.0-3ubuntu1 [88.3 kB] Get:44 http://archive.ubuntu.com/ubuntu xenial/main amd64 gir1.2-glib-2.0 amd64 1.46.0-3ubuntu1 [127 kB] Get:45 http://archive.ubuntu.com/ubuntu xenial/main amd64 iso-codes all 3.65-1 [2268 kB] Get:46 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 krb5-locales all 1.13.2+dfsg-5ubuntu2.1 [13.6 kB] Get:47 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libroken18-heimdal amd64 1.7~git20150920+dfsg-4ubuntu1.16.04.1 [41.4 kB] Get:48 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasn1-8-heimdal amd64 1.7~git20150920+dfsg-4ubuntu1.16.04.1 [174 kB] Get:49 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libkrb5support0 amd64 1.13.2+dfsg-5ubuntu2.1 [31.2 kB] Get:50 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libk5crypto3 amd64 1.13.2+dfsg-5ubuntu2.1 [81.3 kB] Get:51 http://archive.ubuntu.com/ubuntu xenial/main amd64 libkeyutils1 amd64 1.5.9-8ubuntu1 [9904 B] Get:52 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libkrb5-3 amd64 1.13.2+dfsg-5ubuntu2.1 [273 kB] Get:53 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgssapi-krb5-2 amd64 1.13.2+dfsg-5ubuntu2.1 [120 kB] Get:54 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libhcrypto4-heimdal amd64 1.7~git20150920+dfsg-4ubuntu1.16.04.1 [85.0 kB] Get:55 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libheimbase1-heimdal amd64 1.7~git20150920+dfsg-4ubuntu1.16.04.1 [29.3 kB] Get:56 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libwind0-heimdal amd64 1.7~git20150920+dfsg-4ubuntu1.16.04.1 [47.8 kB] Get:57 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libhx509-5-heimdal amd64 1.7~git20150920+dfsg-4ubuntu1.16.04.1 [107 kB] Get:58 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libkrb5-26-heimdal amd64 1.7~git20150920+dfsg-4ubuntu1.16.04.1 [202 kB] Get:59 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libheimntlm0-heimdal amd64 1.7~git20150920+dfsg-4ubuntu1.16.04.1 [15.1 kB] Get:60 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgssapi3-heimdal amd64 1.7~git20150920+dfsg-4ubuntu1.16.04.1 [96.1 kB] Get:61 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsasl2-modules-db amd64 2.1.26.dfsg1-14ubuntu0.2 [14.5 kB] Get:62 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsasl2-2 amd64 2.1.26.dfsg1-14ubuntu0.2 [48.7 kB] Get:63 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libldap-2.4-2 amd64 2.4.42+dfsg-2ubuntu3.9 [159 kB] Get:64 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d-1ubuntu0.1 [54.4 kB] Get:65 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcurl3-gnutls amd64 7.47.0-1ubuntu2.16 [184 kB] Get:66 http://archive.ubuntu.com/ubuntu xenial/main amd64 libdbus-glib-1-2 amd64 0.106-1 [67.1 kB] Get:67 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libglib2.0-data all 2.48.2-0ubuntu4.6 [131 kB] Get:68 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libicu55 amd64 55.1-7ubuntu0.5 [7650 kB] Get:69 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsasl2-modules amd64 2.1.26.dfsg1-14ubuntu0.2 [47.7 kB] Get:70 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libxml2 amd64 2.9.3+dfsg1-1ubuntu0.7 [698 kB] Get:71 http://archive.ubuntu.com/ubuntu xenial/main amd64 powermgmt-base all 1.31+nmu1 [7178 B] Get:72 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-apt-common all 1.1.0~beta1ubuntu0.16.04.9 [16.8 kB] Get:73 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-apt amd64 1.1.0~beta1ubuntu0.16.04.9 [145 kB] Get:74 http://archive.ubuntu.com/ubuntu xenial/main amd64 python3-dbus amd64 1.2.0-3 [83.1 kB] Get:75 http://archive.ubuntu.com/ubuntu xenial/main amd64 python3-gi amd64 3.20.0-0ubuntu1 [153 kB] Get:76 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 shared-mime-info amd64 1.5-2ubuntu0.2 [405 kB] Get:77 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 xdg-user-dirs amd64 0.15-2ubuntu6.16.04.1 [61.8 kB] Get:78 http://archive.ubuntu.com/ubuntu xenial/main amd64 xml-core all 0.13+nmu2 [23.3 kB] Get:79 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-apt amd64 1.1.0~beta1ubuntu0.16.04.9 [147 kB] Get:80 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-pycurl amd64 7.43.0-1ubuntu1 [43.3 kB] Get:81 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-software-properties all 0.96.20.10 [20.6 kB] Get:82 http://archive.ubuntu.com/ubuntu xenial/main amd64 xz-utils amd64 5.1.1alpha+20120614-2ubuntu2 [78.8 kB] Get:83 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 unattended-upgrades all 1.1ubuntu1.18.04.7~16.04.6 [42.1 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 27.9 MB in 1min 50s (252 kB/s) Selecting previously unselected package cron. (Reading database ... 4780 files and directories currently installed.) Preparing to unpack .../cron_3.0pl1-128ubuntu2_amd64.deb ... Unpacking cron (3.0pl1-128ubuntu2) ... Selecting previously unselected package libssl1.0.0:amd64. Preparing to unpack .../libssl1.0.0_1.0.2g-1ubuntu4.17_amd64.deb ... Unpacking libssl1.0.0:amd64 (1.0.2g-1ubuntu4.17) ... Selecting previously unselected package libpython3.5-minimal:amd64. Preparing to unpack .../libpython3.5-minimal_3.5.2-2ubuntu0~16.04.12_amd64.deb ... Unpacking libpython3.5-minimal:amd64 (3.5.2-2ubuntu0~16.04.12) ... Selecting previously unselected package libexpat1:amd64. Preparing to unpack .../libexpat1_2.1.0-7ubuntu0.16.04.5_amd64.deb ... Unpacking libexpat1:amd64 (2.1.0-7ubuntu0.16.04.5) ... Selecting previously unselected package python3.5-minimal. Preparing to unpack .../python3.5-minimal_3.5.2-2ubuntu0~16.04.12_amd64.deb ... Unpacking python3.5-minimal (3.5.2-2ubuntu0~16.04.12) ... Selecting previously unselected package python3-minimal. Preparing to unpack .../python3-minimal_3.5.1-3_amd64.deb ... Unpacking python3-minimal (3.5.1-3) ... Selecting previously unselected package mime-support. Preparing to unpack .../mime-support_3.59ubuntu1_all.deb ... Unpacking mime-support (3.59ubuntu1) ... Selecting previously unselected package libmpdec2:amd64. Preparing to unpack .../libmpdec2_2.4.2-1_amd64.deb ... Unpacking libmpdec2:amd64 (2.4.2-1) ... Selecting previously unselected package libsqlite3-0:amd64. Preparing to unpack .../libsqlite3-0_3.11.0-1ubuntu1.5_amd64.deb ... Unpacking libsqlite3-0:amd64 (3.11.0-1ubuntu1.5) ... Selecting previously unselected package libpython3.5-stdlib:amd64. Preparing to unpack .../libpython3.5-stdlib_3.5.2-2ubuntu0~16.04.12_amd64.deb ... Unpacking libpython3.5-stdlib:amd64 (3.5.2-2ubuntu0~16.04.12) ... Selecting previously unselected package python3.5. Preparing to unpack .../python3.5_3.5.2-2ubuntu0~16.04.12_amd64.deb ... Unpacking python3.5 (3.5.2-2ubuntu0~16.04.12) ... Selecting previously unselected package libpython3-stdlib:amd64. Preparing to unpack .../libpython3-stdlib_3.5.1-3_amd64.deb ... Unpacking libpython3-stdlib:amd64 (3.5.1-3) ... Selecting previously unselected package dh-python. Preparing to unpack .../dh-python_2.20151103ubuntu1.2_all.deb ... Unpacking dh-python (2.20151103ubuntu1.2) ... Processing triggers for systemd (229-4ubuntu21.29) ... Processing triggers for libc-bin (2.23-0ubuntu11.2) ... Setting up libssl1.0.0:amd64 (1.0.2g-1ubuntu4.17) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Setting up libpython3.5-minimal:amd64 (3.5.2-2ubuntu0~16.04.12) ... Setting up libexpat1:amd64 (2.1.0-7ubuntu0.16.04.5) ... Setting up python3.5-minimal (3.5.2-2ubuntu0~16.04.12) ... Setting up python3-minimal (3.5.1-3) ... Processing triggers for libc-bin (2.23-0ubuntu11.2) ... Selecting previously unselected package python3. (Reading database ... 5794 files and directories currently installed.) Preparing to unpack .../python3_3.5.1-3_amd64.deb ... Unpacking python3 (3.5.1-3) ... Selecting previously unselected package libffi6:amd64. Preparing to unpack .../libffi6_3.2.1-4_amd64.deb ... Unpacking libffi6:amd64 (3.2.1-4) ... Selecting previously unselected package libglib2.0-0:amd64. Preparing to unpack .../libglib2.0-0_2.48.2-0ubuntu4.6_amd64.deb ... Unpacking libglib2.0-0:amd64 (2.48.2-0ubuntu4.6) ... Selecting previously unselected package sgml-base. Preparing to unpack .../sgml-base_1.26+nmu4ubuntu1_all.deb ... Unpacking sgml-base (1.26+nmu4ubuntu1) ... Selecting previously unselected package libpython2.7-minimal:amd64. Preparing to unpack .../libpython2.7-minimal_2.7.12-1ubuntu0~16.04.13_amd64.deb ... Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.13) ... Selecting previously unselected package python2.7-minimal. Preparing to unpack .../python2.7-minimal_2.7.12-1ubuntu0~16.04.13_amd64.deb ... Unpacking python2.7-minimal (2.7.12-1ubuntu0~16.04.13) ... Selecting previously unselected package python-minimal. Preparing to unpack .../python-minimal_2.7.12-1~16.04_amd64.deb ... Unpacking python-minimal (2.7.12-1~16.04) ... Selecting previously unselected package libpython2.7-stdlib:amd64. Preparing to unpack .../libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.13_amd64.deb ... Unpacking libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.13) ... Selecting previously unselected package python2.7. Preparing to unpack .../python2.7_2.7.12-1ubuntu0~16.04.13_amd64.deb ... Unpacking python2.7 (2.7.12-1ubuntu0~16.04.13) ... Selecting previously unselected package libpython-stdlib:amd64. Preparing to unpack .../libpython-stdlib_2.7.12-1~16.04_amd64.deb ... Unpacking libpython-stdlib:amd64 (2.7.12-1~16.04) ... Processing triggers for libc-bin (2.23-0ubuntu11.2) ... Setting up libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.13) ... Setting up python2.7-minimal (2.7.12-1ubuntu0~16.04.13) ... Linking and byte-compiling packages for runtime python2.7... Setting up python-minimal (2.7.12-1~16.04) ... Selecting previously unselected package python. (Reading database ... 6616 files and directories currently installed.) Preparing to unpack .../python_2.7.12-1~16.04_amd64.deb ... Unpacking python (2.7.12-1~16.04) ... Selecting previously unselected package distro-info-data. Preparing to unpack .../distro-info-data_0.28ubuntu0.14_all.deb ... Unpacking distro-info-data (0.28ubuntu0.14) ... Selecting previously unselected package libmagic1:amd64. Preparing to unpack .../libmagic1_1%3a5.25-2ubuntu1.4_amd64.deb ... Unpacking libmagic1:amd64 (1:5.25-2ubuntu1.4) ... Selecting previously unselected package file. Preparing to unpack .../file_1%3a5.25-2ubuntu1.4_amd64.deb ... Unpacking file (1:5.25-2ubuntu1.4) ... Selecting previously unselected package libapt-inst2.0:amd64. Preparing to unpack .../libapt-inst2.0_1.2.32ubuntu0.1_amd64.deb ... Unpacking libapt-inst2.0:amd64 (1.2.32ubuntu0.1) ... Selecting previously unselected package libgmp10:amd64. Preparing to unpack .../libgmp10_2%3a6.1.0+dfsg-2_amd64.deb ... Unpacking libgmp10:amd64 (2:6.1.0+dfsg-2) ... Selecting previously unselected package libnettle6:amd64. Preparing to unpack .../libnettle6_3.2-1ubuntu0.16.04.1_amd64.deb ... Unpacking libnettle6:amd64 (3.2-1ubuntu0.16.04.1) ... Selecting previously unselected package libhogweed4:amd64. Preparing to unpack .../libhogweed4_3.2-1ubuntu0.16.04.1_amd64.deb ... Unpacking libhogweed4:amd64 (3.2-1ubuntu0.16.04.1) ... Selecting previously unselected package libidn11:amd64. Preparing to unpack .../libidn11_1.32-3ubuntu1.2_amd64.deb ... Unpacking libidn11:amd64 (1.32-3ubuntu1.2) ... Selecting previously unselected package libp11-kit0:amd64. Preparing to unpack .../libp11-kit0_0.23.2-5~ubuntu16.04.1_amd64.deb ... Unpacking libp11-kit0:amd64 (0.23.2-5~ubuntu16.04.1) ... Selecting previously unselected package libtasn1-6:amd64. Preparing to unpack .../libtasn1-6_4.7-3ubuntu0.16.04.3_amd64.deb ... Unpacking libtasn1-6:amd64 (4.7-3ubuntu0.16.04.3) ... Selecting previously unselected package libgnutls30:amd64. Preparing to unpack .../libgnutls30_3.4.10-4ubuntu1.8_amd64.deb ... Unpacking libgnutls30:amd64 (3.4.10-4ubuntu1.8) ... Selecting previously unselected package lsb-release. Preparing to unpack .../lsb-release_9.20160110ubuntu0.2_all.deb ... Unpacking lsb-release (9.20160110ubuntu0.2) ... Selecting previously unselected package ucf. Preparing to unpack .../archives/ucf_3.0036_all.deb ... Moving old data out of the way Unpacking ucf (3.0036) ... Selecting previously unselected package openssl. Preparing to unpack .../openssl_1.0.2g-1ubuntu4.17_amd64.deb ... Unpacking openssl (1.0.2g-1ubuntu4.17) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../ca-certificates_20190110~16.04.1_all.deb ... Unpacking ca-certificates (20190110~16.04.1) ... Selecting previously unselected package libcap-ng0:amd64. Preparing to unpack .../libcap-ng0_0.7.7-1_amd64.deb ... Unpacking libcap-ng0:amd64 (0.7.7-1) ... Selecting previously unselected package libdbus-1-3:amd64. Preparing to unpack .../libdbus-1-3_1.10.6-1ubuntu3.6_amd64.deb ... Unpacking libdbus-1-3:amd64 (1.10.6-1ubuntu3.6) ... Selecting previously unselected package dbus. Preparing to unpack .../dbus_1.10.6-1ubuntu3.6_amd64.deb ... Unpacking dbus (1.10.6-1ubuntu3.6) ... Selecting previously unselected package libgirepository-1.0-1:amd64. Preparing to unpack .../libgirepository-1.0-1_1.46.0-3ubuntu1_amd64.deb ... Unpacking libgirepository-1.0-1:amd64 (1.46.0-3ubuntu1) ... Selecting previously unselected package gir1.2-glib-2.0:amd64. Preparing to unpack .../gir1.2-glib-2.0_1.46.0-3ubuntu1_amd64.deb ... Unpacking gir1.2-glib-2.0:amd64 (1.46.0-3ubuntu1) ... Selecting previously unselected package iso-codes. Preparing to unpack .../iso-codes_3.65-1_all.deb ... Unpacking iso-codes (3.65-1) ... Selecting previously unselected package krb5-locales. Preparing to unpack .../krb5-locales_1.13.2+dfsg-5ubuntu2.1_all.deb ... Unpacking krb5-locales (1.13.2+dfsg-5ubuntu2.1) ... Selecting previously unselected package libroken18-heimdal:amd64. Preparing to unpack .../libroken18-heimdal_1.7~git20150920+dfsg-4ubuntu1.16.04.1_amd64.deb ... Unpacking libroken18-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Selecting previously unselected package libasn1-8-heimdal:amd64. Preparing to unpack .../libasn1-8-heimdal_1.7~git20150920+dfsg-4ubuntu1.16.04.1_amd64.deb ... Unpacking libasn1-8-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Selecting previously unselected package libkrb5support0:amd64. Preparing to unpack .../libkrb5support0_1.13.2+dfsg-5ubuntu2.1_amd64.deb ... Unpacking libkrb5support0:amd64 (1.13.2+dfsg-5ubuntu2.1) ... Selecting previously unselected package libk5crypto3:amd64. Preparing to unpack .../libk5crypto3_1.13.2+dfsg-5ubuntu2.1_amd64.deb ... Unpacking libk5crypto3:amd64 (1.13.2+dfsg-5ubuntu2.1) ... Selecting previously unselected package libkeyutils1:amd64. Preparing to unpack .../libkeyutils1_1.5.9-8ubuntu1_amd64.deb ... Unpacking libkeyutils1:amd64 (1.5.9-8ubuntu1) ... Selecting previously unselected package libkrb5-3:amd64. Preparing to unpack .../libkrb5-3_1.13.2+dfsg-5ubuntu2.1_amd64.deb ... Unpacking libkrb5-3:amd64 (1.13.2+dfsg-5ubuntu2.1) ... Selecting previously unselected package libgssapi-krb5-2:amd64. Preparing to unpack .../libgssapi-krb5-2_1.13.2+dfsg-5ubuntu2.1_amd64.deb ... Unpacking libgssapi-krb5-2:amd64 (1.13.2+dfsg-5ubuntu2.1) ... Selecting previously unselected package libhcrypto4-heimdal:amd64. Preparing to unpack .../libhcrypto4-heimdal_1.7~git20150920+dfsg-4ubuntu1.16.04.1_amd64.deb ... Unpacking libhcrypto4-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Selecting previously unselected package libheimbase1-heimdal:amd64. Preparing to unpack .../libheimbase1-heimdal_1.7~git20150920+dfsg-4ubuntu1.16.04.1_amd64.deb ... Unpacking libheimbase1-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Selecting previously unselected package libwind0-heimdal:amd64. Preparing to unpack .../libwind0-heimdal_1.7~git20150920+dfsg-4ubuntu1.16.04.1_amd64.deb ... Unpacking libwind0-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Selecting previously unselected package libhx509-5-heimdal:amd64. Preparing to unpack .../libhx509-5-heimdal_1.7~git20150920+dfsg-4ubuntu1.16.04.1_amd64.deb ... Unpacking libhx509-5-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Selecting previously unselected package libkrb5-26-heimdal:amd64. Preparing to unpack .../libkrb5-26-heimdal_1.7~git20150920+dfsg-4ubuntu1.16.04.1_amd64.deb ... Unpacking libkrb5-26-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Selecting previously unselected package libheimntlm0-heimdal:amd64. Preparing to unpack .../libheimntlm0-heimdal_1.7~git20150920+dfsg-4ubuntu1.16.04.1_amd64.deb ... Unpacking libheimntlm0-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Selecting previously unselected package libgssapi3-heimdal:amd64. Preparing to unpack .../libgssapi3-heimdal_1.7~git20150920+dfsg-4ubuntu1.16.04.1_amd64.deb ... Unpacking libgssapi3-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Selecting previously unselected package libsasl2-modules-db:amd64. Preparing to unpack .../libsasl2-modules-db_2.1.26.dfsg1-14ubuntu0.2_amd64.deb ... Unpacking libsasl2-modules-db:amd64 (2.1.26.dfsg1-14ubuntu0.2) ... Selecting previously unselected package libsasl2-2:amd64. Preparing to unpack .../libsasl2-2_2.1.26.dfsg1-14ubuntu0.2_amd64.deb ... Unpacking libsasl2-2:amd64 (2.1.26.dfsg1-14ubuntu0.2) ... Selecting previously unselected package libldap-2.4-2:amd64. Preparing to unpack .../libldap-2.4-2_2.4.42+dfsg-2ubuntu3.9_amd64.deb ... Unpacking libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.9) ... Selecting previously unselected package librtmp1:amd64. Preparing to unpack .../librtmp1_2.4+20151223.gitfa8646d-1ubuntu0.1_amd64.deb ... Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d-1ubuntu0.1) ... Selecting previously unselected package libcurl3-gnutls:amd64. Preparing to unpack .../libcurl3-gnutls_7.47.0-1ubuntu2.16_amd64.deb ... Unpacking libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.16) ... Selecting previously unselected package libdbus-glib-1-2:amd64. Preparing to unpack .../libdbus-glib-1-2_0.106-1_amd64.deb ... Unpacking libdbus-glib-1-2:amd64 (0.106-1) ... Selecting previously unselected package libglib2.0-data. Preparing to unpack .../libglib2.0-data_2.48.2-0ubuntu4.6_all.deb ... Unpacking libglib2.0-data (2.48.2-0ubuntu4.6) ... Selecting previously unselected package libicu55:amd64. Preparing to unpack .../libicu55_55.1-7ubuntu0.5_amd64.deb ... Unpacking libicu55:amd64 (55.1-7ubuntu0.5) ... Selecting previously unselected package libsasl2-modules:amd64. Preparing to unpack .../libsasl2-modules_2.1.26.dfsg1-14ubuntu0.2_amd64.deb ... Unpacking libsasl2-modules:amd64 (2.1.26.dfsg1-14ubuntu0.2) ... Selecting previously unselected package libxml2:amd64. Preparing to unpack .../libxml2_2.9.3+dfsg1-1ubuntu0.7_amd64.deb ... Unpacking libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.7) ... Selecting previously unselected package powermgmt-base. Preparing to unpack .../powermgmt-base_1.31+nmu1_all.deb ... Unpacking powermgmt-base (1.31+nmu1) ... Selecting previously unselected package python-apt-common. Preparing to unpack .../python-apt-common_1.1.0~beta1ubuntu0.16.04.9_all.deb ... Unpacking python-apt-common (1.1.0~beta1ubuntu0.16.04.9) ... Selecting previously unselected package python3-apt. Preparing to unpack .../python3-apt_1.1.0~beta1ubuntu0.16.04.9_amd64.deb ... Unpacking python3-apt (1.1.0~beta1ubuntu0.16.04.9) ... Selecting previously unselected package python3-dbus. Preparing to unpack .../python3-dbus_1.2.0-3_amd64.deb ... Unpacking python3-dbus (1.2.0-3) ... Selecting previously unselected package python3-gi. Preparing to unpack .../python3-gi_3.20.0-0ubuntu1_amd64.deb ... Unpacking python3-gi (3.20.0-0ubuntu1) ... Selecting previously unselected package shared-mime-info. Preparing to unpack .../shared-mime-info_1.5-2ubuntu0.2_amd64.deb ... Unpacking shared-mime-info (1.5-2ubuntu0.2) ... Selecting previously unselected package xdg-user-dirs. Preparing to unpack .../xdg-user-dirs_0.15-2ubuntu6.16.04.1_amd64.deb ... Unpacking xdg-user-dirs (0.15-2ubuntu6.16.04.1) ... Selecting previously unselected package xml-core. Preparing to unpack .../xml-core_0.13+nmu2_all.deb ... Unpacking xml-core (0.13+nmu2) ... Selecting previously unselected package python-apt. Preparing to unpack .../python-apt_1.1.0~beta1ubuntu0.16.04.9_amd64.deb ... Unpacking python-apt (1.1.0~beta1ubuntu0.16.04.9) ... Selecting previously unselected package python-pycurl. Preparing to unpack .../python-pycurl_7.43.0-1ubuntu1_amd64.deb ... Unpacking python-pycurl (7.43.0-1ubuntu1) ... Selecting previously unselected package python-software-properties. Preparing to unpack .../python-software-properties_0.96.20.10_all.deb ... Unpacking python-software-properties (0.96.20.10) ... Selecting previously unselected package xz-utils. Preparing to unpack .../xz-utils_5.1.1alpha+20120614-2ubuntu2_amd64.deb ... Unpacking xz-utils (5.1.1alpha+20120614-2ubuntu2) ... Selecting previously unselected package unattended-upgrades. Preparing to unpack .../unattended-upgrades_1.1ubuntu1.18.04.7~16.04.6_all.deb ... Unpacking unattended-upgrades (1.1ubuntu1.18.04.7~16.04.6) ... Processing triggers for libc-bin (2.23-0ubuntu11.2) ... Processing triggers for systemd (229-4ubuntu21.29) ... Setting up cron (3.0pl1-128ubuntu2) ... Adding group `crontab' (GID 106) ... Done. update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults update-rc.d: warning: stop runlevel arguments (1) do not match cron Default-Stop values (none) invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of start. Setting up mime-support (3.59ubuntu1) ... Setting up libmpdec2:amd64 (2.4.2-1) ... Setting up libsqlite3-0:amd64 (3.11.0-1ubuntu1.5) ... Setting up libpython3.5-stdlib:amd64 (3.5.2-2ubuntu0~16.04.12) ... Setting up python3.5 (3.5.2-2ubuntu0~16.04.12) ... Setting up libpython3-stdlib:amd64 (3.5.1-3) ... Setting up libffi6:amd64 (3.2.1-4) ... Setting up libglib2.0-0:amd64 (2.48.2-0ubuntu4.6) ... No schema files found: doing nothing. Setting up sgml-base (1.26+nmu4ubuntu1) ... Setting up libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.13) ... Setting up python2.7 (2.7.12-1ubuntu0~16.04.13) ... Setting up libpython-stdlib:amd64 (2.7.12-1~16.04) ... Setting up python (2.7.12-1~16.04) ... Setting up distro-info-data (0.28ubuntu0.14) ... Setting up libmagic1:amd64 (1:5.25-2ubuntu1.4) ... Setting up file (1:5.25-2ubuntu1.4) ... Setting up libapt-inst2.0:amd64 (1.2.32ubuntu0.1) ... Setting up libgmp10:amd64 (2:6.1.0+dfsg-2) ... Setting up libnettle6:amd64 (3.2-1ubuntu0.16.04.1) ... Setting up libhogweed4:amd64 (3.2-1ubuntu0.16.04.1) ... Setting up libidn11:amd64 (1.32-3ubuntu1.2) ... Setting up libp11-kit0:amd64 (0.23.2-5~ubuntu16.04.1) ... Setting up libtasn1-6:amd64 (4.7-3ubuntu0.16.04.3) ... Setting up libgnutls30:amd64 (3.4.10-4ubuntu1.8) ... Setting up ucf (3.0036) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Setting up openssl (1.0.2g-1ubuntu4.17) ... Setting up ca-certificates (20190110~16.04.1) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Setting up libcap-ng0:amd64 (0.7.7-1) ... Setting up libdbus-1-3:amd64 (1.10.6-1ubuntu3.6) ... Setting up dbus (1.10.6-1ubuntu3.6) ... Setting up libgirepository-1.0-1:amd64 (1.46.0-3ubuntu1) ... Setting up gir1.2-glib-2.0:amd64 (1.46.0-3ubuntu1) ... Setting up iso-codes (3.65-1) ... Setting up krb5-locales (1.13.2+dfsg-5ubuntu2.1) ... Setting up libroken18-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Setting up libasn1-8-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Setting up libkrb5support0:amd64 (1.13.2+dfsg-5ubuntu2.1) ... Setting up libk5crypto3:amd64 (1.13.2+dfsg-5ubuntu2.1) ... Setting up libkeyutils1:amd64 (1.5.9-8ubuntu1) ... Setting up libkrb5-3:amd64 (1.13.2+dfsg-5ubuntu2.1) ... Setting up libgssapi-krb5-2:amd64 (1.13.2+dfsg-5ubuntu2.1) ... Setting up libhcrypto4-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Setting up libheimbase1-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Setting up libwind0-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Setting up libhx509-5-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Setting up libkrb5-26-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Setting up libheimntlm0-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Setting up libgssapi3-heimdal:amd64 (1.7~git20150920+dfsg-4ubuntu1.16.04.1) ... Setting up libsasl2-modules-db:amd64 (2.1.26.dfsg1-14ubuntu0.2) ... Setting up libsasl2-2:amd64 (2.1.26.dfsg1-14ubuntu0.2) ... Setting up libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.9) ... Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d-1ubuntu0.1) ... Setting up libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.16) ... Setting up libdbus-glib-1-2:amd64 (0.106-1) ... Setting up libglib2.0-data (2.48.2-0ubuntu4.6) ... Setting up libicu55:amd64 (55.1-7ubuntu0.5) ... Setting up libsasl2-modules:amd64 (2.1.26.dfsg1-14ubuntu0.2) ... Setting up libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.7) ... Setting up powermgmt-base (1.31+nmu1) ... Setting up python-apt-common (1.1.0~beta1ubuntu0.16.04.9) ... Setting up shared-mime-info (1.5-2ubuntu0.2) ... Setting up xdg-user-dirs (0.15-2ubuntu6.16.04.1) ... Setting up xml-core (0.13+nmu2) ... Setting up python-apt (1.1.0~beta1ubuntu0.16.04.9) ... Setting up python-pycurl (7.43.0-1ubuntu1) ... Setting up xz-utils (5.1.1alpha+20120614-2ubuntu2) ... update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode Setting up dh-python (2.20151103ubuntu1.2) ... Setting up python3 (3.5.1-3) ... running python rtupdate hooks for python3.5... running python post-rtupdate hooks for python3.5... Setting up lsb-release (9.20160110ubuntu0.2) ... Setting up python3-apt (1.1.0~beta1ubuntu0.16.04.9) ... Setting up python3-dbus (1.2.0-3) ... Setting up python3-gi (3.20.0-0ubuntu1) ... Setting up python-software-properties (0.96.20.10) ... Setting up unattended-upgrades (1.1ubuntu1.18.04.7~16.04.6) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype Creating config file /etc/apt/apt.conf.d/20auto-upgrades with new version Creating config file /etc/apt/apt.conf.d/50unattended-upgrades with new version Processing triggers for systemd (229-4ubuntu21.29) ... Processing triggers for libc-bin (2.23-0ubuntu11.2) ... Processing triggers for ca-certificates (20190110~16.04.1) ... Updating certificates in /etc/ssl/certs... 127 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Processing triggers for sgml-base (1.26+nmu4ubuntu1) ... Removing intermediate container b4f5db0d4277 ---> be37f3d13c47 Step 4/11 : RUN apt-get install -y software-properties-common ---> Running in 5dd065b5642f Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: python3-pycurl python3-software-properties Suggested packages: libcurl4-gnutls-dev python-pycurl-doc python3-pycurl-dbg The following NEW packages will be installed: python3-pycurl python3-software-properties software-properties-common 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 72.0 kB of archives. After this operation, 483 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 python3-pycurl amd64 7.43.0-1ubuntu1 [42.3 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-software-properties all 0.96.20.10 [20.2 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 software-properties-common all 0.96.20.10 [9504 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 72.0 kB in 1s (51.3 kB/s) Selecting previously unselected package python3-pycurl. (Reading database ... 8408 files and directories currently installed.) Preparing to unpack .../python3-pycurl_7.43.0-1ubuntu1_amd64.deb ... Unpacking python3-pycurl (7.43.0-1ubuntu1) ... Selecting previously unselected package python3-software-properties. Preparing to unpack .../python3-software-properties_0.96.20.10_all.deb ... Unpacking python3-software-properties (0.96.20.10) ... Selecting previously unselected package software-properties-common. Preparing to unpack .../software-properties-common_0.96.20.10_all.deb ... Unpacking software-properties-common (0.96.20.10) ... Processing triggers for dbus (1.10.6-1ubuntu3.6) ... Setting up python3-pycurl (7.43.0-1ubuntu1) ... Setting up python3-software-properties (0.96.20.10) ... Setting up software-properties-common (0.96.20.10) ... Processing triggers for dbus (1.10.6-1ubuntu3.6) ... Removing intermediate container 5dd065b5642f ---> 02ea2f860a4d Step 5/11 : RUN add-apt-repository ppa:bitcoin/bitcoin ---> Running in e0f89744d2f0 NOT MAINTAINED. The OS-library linking packages here had a series of issues. PLEASE DOWNLOAD DIRECTLY FROM bitcoincore.org (and verify the signatures of said files). IF YOU WANT AUTO-UPDATES, please see the officially-maintained snap package - https://github.com/bitcoin-core/packaging/tree/master/snap More info: https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin gpg: keyring `/tmp/tmphrg15vnm/secring.gpg' created gpg: keyring `/tmp/tmphrg15vnm/pubring.gpg' created gpg: requesting key 8842CE5E from hkp server keyserver.ubuntu.com gpg: /tmp/tmphrg15vnm/trustdb.gpg: trustdb created gpg: key 8842CE5E: public key "Launchpad PPA for Bitcoin" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK Removing intermediate container e0f89744d2f0 ---> b81c0b64d050 Step 6/11 : RUN apt-get update -y ---> Running in f5e3ffb92318 Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease Get:2 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu xenial InRelease [17.5 kB] Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease Get:5 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu xenial/main amd64 Packages [2169 B] Hit:6 http://security.ubuntu.com/ubuntu xenial-security InRelease Fetched 19.7 kB in 5s (3527 B/s) Reading package lists... Removing intermediate container f5e3ffb92318 ---> f9d21b3c9e07 Step 7/11 : RUN apt-get install -y bitcoind ---> Running in afb933e1ded8 Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package bitcoind ERROR: Service 'daemon_one' failed to build : The command '/bin/sh -c apt-get install -y bitcoind' returned a non-zero code: 100 C:\Users\ebata\bitcoin> 

RUN add-apt-repository ppa:bitcoin/bitcoin を ppa:luke-jr/bitcoincore に変更してみたら、Dockerfileが通った

 

 

ターミナルを開いて、コンテナに入ります。
docker exec -it bitcoin_1 /bin/bash
 root@bitcoin_1:/# bitcoind -daemon Bitcoin Core starting root@bitcoin_1:/# bitcoin-cli generate 100 error code: -32601 error message: Method not found

あれ?

bitcoin-cli getinfoで確認出来るって書いてたけど、もう無くなったAPIになっちゃてたみたい

This command doesn't exist anymore since Bitcoin Core 0.19. Use generatetoaddress instead. てなことが記載されている。

ここを読んでみると、

Generate 11 blocks to myaddress
> bitcoin-cli generatetoaddress 11 "myaddress"
If you are running the bitcoin core wallet, you can get a new address to send the newly generated bitcoin to with:
> bitcoin-cli getnewaddress

てな記載がある。

とにかくブロックを作らんことには、金(ビットコイン)が稼げないが、上記の"myaddress"が何ならよう分からん。

ここ の記事にある、bitcoin-cli generatetoaddress 101 `bitcoin-cli getnewaddress`

をやってもいいものなのか?

ちなみに、bitcoin-cli getnewaddress を実行すると、

root@bitcoin_1:/# bitcoin-cli getnewaddress
bcrt1qymag0kvldyw4saejksnssv92ss3awrkp5vz6ef

てな内容が出てくる(アドレス、モロばれだけど、実際の環境では使わないからいいかな)

で、やってみた。

root@bitcoin_1:/# bitcoin-cli generatetoaddress 101 `bitcoin-cli getnewaddress`
[
"4177f527560e47a246ab9c00e88c4255b3b7acc7772ac8f691e2444977005a7e",
"2a5d403754cea5be3dcbead230b24887209c0832b4adbc39deb5c94b9fe02b08",
"56ace4b11685e895b14476863b649996cf0a2be7d99ba90487baebc6f1469f1a",
"4a52e7133141ec90278cfa960db52865b0ae26383d4d54faba1a3011054f82f0",
"5231d7dfcc5a7de895294b4caaae234949179d1978fb08f7c4bea2d460092616",
"165e2c7989a2e7392f573769a7abfda4f0ea31a7cbf6ade5189fc82d605aafe9",
"2c581e76e8bf6441a1a9b9f4f79bb8ec2eb51fcfdc866c2e555bab9a4c6ca286",
"7fed803ad55e2aa646ee49acb903cd82092b73f4486e592493b9733ed2747c2d",
"2f74ea1621a8016f0c726e84710f2b6a8960872e6a384c7a718d31b989f4ccbc",
"0db3f0879ad15be05ae2d345bd68d944c1014b95019e9797c99239346a860ca7",
"62f22bf9f9a37398fb0d05ec02b3dd07484cb82f24a6a0e6e3044f8d0f609138",
"228d3b9a56f3c3553cd828b9dfa0a7d26ad212625d303fe37026432685e9ca8c",
"2bc79a882222d359833d6d502823d18d822cf73389b82f2f91a470e8aa959202",
"1a218e6d2d25f9f4b11a487c596c8550da93dcc9be8588de25b2d6fbfc28d401",
"66bc748557187e1a899e0d1fda8b763344c504124e9e30583facd42d6a711778",
"3ec3631019a691f4da89c29563bef83e82b4da50b552bc17605353c626f991d8",
"03006db53a078364eda8462ad6f33dfe2fb7cb7dc4cbb80f2306887cd02eca07",
"3a3ba0070d431abdce94a894bd88cb436af44cf8841c66e2fd6bbac95d70f06d",
"0b57e21ad6c9f25a95b32cc7e2ccfe5a290d522060dd259312790037de31d64b",
"604ae4c582c4c3fdc8ca8f3ee2bf43ebf6f80b8f4f565d9133e49b4e83cd3d4b",
"31429fef4d34dad0d0dd6ab5da9ba02e363b5b36f63399b9ccd5fd04294a4b32",
"19723216344b0b02e696700d7a96bb343dc7c31b318f87bdc5b5d012794a6ed9",
"4d998f07124795428c6b99749efcfd93df0bbaf6c266d7935c312ad74a86ce0a",
"2448217b611b82631ef8cd3aaf3f5b54237f39092dd4e24dd62b6420cb2224d7",
"41c938ece2f9dcacd7261f90a400646a90d026d545fe9d05cf0fd5d2ff599240",
"50fc0af9714ebbaedb692132895405ce3272e928de96472a1fb9bf9d41e21bcf",
"77348b3afa398920d3e9c4c4c73f9bdae2c9ba2325f91f8229f2d5329abc6067",
"064f502414991675fd0eafdbc013fa437108bf641cdcae6f90d4ceacc4780c8d",
"66291c94d0ba5da56f80ae3c6e0cbf9b8094845239125a0f8211c6c76fee0e66",
"66900f87b1b4a32bff9c46100800ae5e6c42cc407515d5c2d09eca46877c71cf",
"1f6f13ec5cca4a8f00fd7436c1d25d8f9841f2fa51e91857291b6ee5274aa962",
"0423406749eb449c0c94b8d3766555038c6dadda04c4ff0d4e73427df1017b03",
"033a07ca40f30768424cfc10b88d13c0a9750eb898dbdebc5e28d4dcbeab2577",
"4fd38f4eeb9a0201bf08b47765e6179b43aa1a0d6f18677d6af3e4593d4b6ae2",
"41158030deaf4caf1ce37b919e788d168bcdd0ec2f5a28842368e21bfc30c645",
"1af821dd38d22c0d855522635c9089bf0d5ff962d87026e8367458af3b30ac09",
"5ef03f6423957f46adee2fcc957d287418885650057fb1d90a278f7ecbbc4bf0",
"03ec5fef2f98eb7ed818e87d2d95225918523b71625479cba7c78a6280f68660",
"4a4bd1f23ebd6ae5ca9fab7ae2c775c964d061178b355e576e736faaae85d8c7",
"58d3d30078bae0a899d6b7a816283643e09994f7548f5ba53191f0465094042a",
"57e822309588a318f4a7294bf525ec99fb7fd34f9b7a77761de0b58a25b8fc18",
"2994a3bea7669ce10a317686b878be2e84784446e3ad6c455de1f763f903fa44",
"70c80bc118ae9c238ec4a16a068555391efb9cf8b8bf19b14a83f8e6347ac75a",
"3109660d42242062667335463a473d285260e93ec725d442611e71eaf6eb4647",
"6463e5937deea0ec5c7a0e333b78726831440f7da499d27278803483f1b7b159",
"0750647a6e537758065b7ab13955bbe771841c950eceaf84c3b8494f3ef120b2",
"7f73b6998c3f11b3960da9c20828e74085410e37c69efd64779d0672310088b4",
"167f911d6192f5387009dfcc684fd5c882b5bd3be38ee01a918ef5ce89fb36bc",
"12e8937f16ede3cae67f73cefe764bc79aeecf61113d20fc3156d422c338c30c",
"41c9f793360a87528a7b3de4e51f33e6a466c57c11f7760676edb33ebc6a9f7e",
"33a3e607e53b402d68ac2bfd4e829c4c4f741869da4468dbe03a0a2d98f291c4",
"33cac25e7ec93ee93e8f2a95276a808100dcc941242326cb176278415c345ed8",
"6a979424fa152e5996762965189804cd2946c208e1ed68697d3ec8fcdeb2002b",
"411a9f258bf9b7fa455de052c1e80c254d3cf59f545b433c129b3592188e5d09",
"057c705b1556d45eb98e6cc586c9118e2baffeb542ec6943d8a237392c8d4316",
"7ea3a47ae7fa7c57ac80f223964290f132d887e7f6f66c49fda67180da1f4ec5",
"0947a3a9ac627fa3b04c6828c0af9e62ec5bfd506d52c1d5e049b2e677341597",
"4b2b755ba0446662de1a28357bf841007d2e0701f77667170ebe3afc081cf2f8",
"6be55f71c3f4e71467ae0a74b67c298c0caa0c889efbabcc67762f92aaff03c8",
"283a7855e14de3919395ec717b692c3cd990b278d2d5c90699acc85eaa49757a",
"14ac5a3afaca4492060d3dbea2474e918127acb59d4bf2e514e6f384eb0fa53c",
"05c397cd9cdda0f359fd4e915067bf11b195e5d3dc1a5aea34bd64ebdd26f1d5",
"280933eba56163feaf275c0bc2e3b81048539d34788ec22090313518e8aca1b9",
"29c3a23724fc07ced98367affb0f7def6cbb2cfe4fe3289c91bfcbb1d9062884",
"1a8f2665107c50442d01ec3c3b9dead73a7237f3414d7fa438415e78509cb53e",
"436a7fac474736aed85dc7d4e312b9fdfffc6a53b7e19422f478268cb20eb424",
"1f39a851008729db5d7c0aba7888d8ccba06ac847bc4542095e03f574b70eb4e",
"15cfd6f53704ca6e4de027cab4a25149e6a04b8ce03fba4289cb5b9cdb6f9a59",
"650de6dd79484716987c42410a465d5dfa54b2a99fc7d603723df5607e4e20dd",
"1cfeedc95e1acd9cffcb26b0483884134f40d5a283d937b7b43c16b614892931",
"4ea1e49e8a3b717fee3deaf7ba3ee14274d32f9c4a98d02bbb18da2f0cdafde7",
"6d0b95389dcb352a78eab47f9ceabdcd4f9bd3ea589f737bc313bcf24a8b0486",
"4f763813798b72049943d6614a516d37d407e3eaba6779e41bf1ac538350bdab",
"0de431dcee2bbd808a54d1acab883ed5496dc8ccc1d363540ff3ce440f304c43",
"4a199b4331a5fc6a27b8d3a2876e97554aa7113fc0eb667c0c147abeea9b9e1d",
"75f6ba9f84c88b9878ed7b3df63b6c1586be6fce2b5b9f4cd5595343b831651d",
"4f65083dd5077f084e0e4a588ea59207a4a712eec902e31d33c2d4965a80c1a1",
"2987e28e6b7b2383ac206726c4a9ca07a4e4f705fb12adcdfe10cfdcff565d3a",
"3fc9fdd7270744fff4285498c8a7f8619fb8ec89f827a462045ce8c3a8583b02",
"068ab89a648e1e9da4636a63a1a1ff5edea123a4f21667281f58ee7b3f43fccd",
"4df5562e0874f9a4253107f798f5d177640ab44d161b5c0d4fcdfe935e7cc009",
"59e86db93218d2aa4b07105dcd6edd07d2dd85152662a261af1f47d2aac042cc",
"0b15af3d8d1b08b3bde093e85078dffa754a5924c79085c4be1c91a713fe8062",
"00bb8022cea7cf517c41b95db0250e3389f02c2f034dd0e21cf441b35f256db4",
"25c7bad69581eb1c673693c9b5ecea34fd3981292badb90c41fa6fcff925dbac",
"4830bf3b369b0ba3975ab08b3fff07b9546c8fda6e2b7e55f305b8381f18fd6e",
"39855405738ed795c9f23cf933ac66e0b04ebabe50f28e102cd659166f9c7ff0",
"276797adb3a45042cb357525c7bb2053af26f97b158078d87f4965174a61456e",
"3ae64d52d4e9e80c072685e88cfb576c992e49a9f3808c1cee29279bff8fc90d",
"608ae941f8351e5e8bdc936d84009a0d93b79f82afaa69512cb41d4b6b13b2b6",
"20ed7ebbf55105697c6754440f1ffb68f796046b5e9bf9a5bf13fe12b762b915",
"318988c1b686efe428b3d4d9f711f26654a506007a30013d1946f01d3b21a1dd",
"00920ebf768761a74b9c6a89f3a16bbf5fc1cbea6f4c8af17eb3d7bdc1db45be",
"2f547f083680726977aa47a64303fd2fcf88c63e9ab6c0d983aab4e55dfa4011",
"2bfc89a56cec028ef08612e5a700b475baf73eb1d7404e3d4e18d22d0fb84871",
"67ee0490dde106367d715f5dedc13fa9a365b6551edeba1187f2fac260c91840",
"2ab1cff953dc2fecb4647bead68bdf8f27670e55989234ac77be1387437ad04e",
"699a01f27c9f4071ef5fa1db01ecee0b1cea4d717e936f5a689d90b82b40797c",
"50851ed32add0fa33db1b4f665ca8132f2109966811aff6a3b8f7f1d103d6165",
"25cc07422e00d859504bf4f7e072e9550d176860b5217c823cea5e93aef788c4",
"7114500ec4d179a09d609bde6cdf5d7c8f84920eca9d4f1efe102a3869591b37"
]
root@bitcoin_1:/#

うん、なんかブロックできたみたいだ。

root@bitcoin_1:/# bitcoin-cli getblockcount
500

うん、できている。では金額を確認してみよう。

root@bitcoin_1:/# bitcoin-cli getbalance
50.00000000

おお! 凄い。今1BTCが120万円くらいだから、6000万円を作ってしまったぞ! 

では、ここで口座(アカウント)を作ってみよう。

bitcoin-cli getnewaddress testuser1
bcrt1qhzknya5w4qcyxnq0lkcwumu9py2c624ujv79f6

でもって、残高を調べるけど・・・

root@bitcoin_1:/# bitcoin-cli getnewaddress testuser1
bcrt1qhzknya5w4qcyxnq0lkcwumu9py2c624ujv79f6
root@bitcoin_1:/# bitcoin-cli getbalance testuser1
error code: -32
error message:
dummy first argument must be excluded or set to "*".
root@bitcoin_1:/# bitcoin-cli getbalance *
error: Error parsing JSON:boot
root@bitcoin_1:/# bitcoin-cli getbalance bcrt1qhzknya5w4qcyxnq0lkcwumu9py2c624ujv79f6
error code: -32
error message:
dummy first argument must be excluded or set to "*".
root@bitcoin_1:/# bitcoin-cli -regtest getbalance bcrt1qhzknya5w4qcyxnq0lkcwumu9py2c624ujv79f6
error code: -32
error message:
dummy first argument must be excluded or set to "*".
root@bitcoin_1:/# bitcoin-cli getbalance bcrt1qhzknya5w4qcyxnq0lkcwumu9py2c624ujv79f6
error code: -32
error message:
dummy first argument must be excluded or set to "*".
root@bitcoin_1:/# bitcoin-cli getbalance "*"
12462.50000000
root@bitcoin_1:/# bitcoin-cli getbalance "testuser1"
error code: -32
error message:
dummy first argument must be excluded or set to "*".
root@bitcoin_1:/# bitcoin-cli getbalance "bcrt1qhzknya5w4qcyxnq0lkcwumu9py2c624ujv79f6"
error code: -32
error message:
dummy first argument must be excluded or set to "*".
root@bitcoin_1:/#

あれー? 上手く表示されないなぁ。

この当たりを探ってみる。

root@bitcoin_1:/# bitcoin-cli listaddressgroupings
[
  [
    [
      "bcrt1q37qd0chv7he5epgeaycm236zke2kx37esh2we0",
      12462.50000000,
      ""
    ]
  ]
] 二人目のユーザ(アドレス:bcrt1qhzknya5w4qcyxnq0lkcwumu9py2c624ujv79f6)がいない
C:\Users\ebata\bitcoin>docker exec -it bitcoin_1 /bin/bash
root@bitcoin_1:/# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@bitcoin_1:/#
root@bitcoin_1:/#
root@bitcoin_1:/#
root@bitcoin_1:/#
root@bitcoin_1:/#
root@bitcoin_1:/#
root@bitcoin_1:/# bitcoin-cli getbalance
50.00000000
root@bitcoin_1:/# bitcoin-cli getbalance "*"
50.00000000
root@bitcoin_1:/# bitcoin-cli getblockchaininfo
{
  "chain": "regtest",
  "blocks": 101,
  "headers": 101,
  "bestblockhash": "7114500ec4d179a09d609bde6cdf5d7c8f84920eca9d4f1efe102a3869591b37",
  "difficulty": 4.656542373906925e-10,
  "mediantime": 1602937028,
  "verificationprogress": 1,
  "initialblockdownload": false,
  "chainwork": "00000000000000000000000000000000000000000000000000000000000000cc",
  "size_on_disk": 30476,
  "pruned": false,
  "softforks": {
    "bip34": {
      "type": "buried",
      "active": false,
      "height": 500
    },
    "bip66": {
      "type": "buried",
      "active": false,
      "height": 1251
    },
    "bip65": {
      "type": "buried",
      "active": false,
      "height": 1351
    },
    "csv": {
      "type": "buried",
      "active": false,
      "height": 432
    },
    "segwit": {
      "type": "buried",
      "active": true,
      "height": 0
    },
    "testdummy": {
      "type": "bip9",
      "bip9": {
        "status": "defined",
        "start_time": 0,
        "timeout": 9223372036854775807,
        "since": 0
      },
      "active": false
    }
  },
  "warnings": ""
}
root@bitcoin_1:/# bitcoin-cli getconnectioncount
0
root@bitcoin_1:/# bitcoin-cli getpeerinfo
[
]
root@bitcoin_1:/# bitcoin-cli getnewaddress
bcrt1qa5wzz2pw85f670fsaqpg26thtddeh5dw6u33he

root@bitcoin_1:/# bitcoin-cli listtransactions
[
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 10,
    "generated": true,
    "blockhash": "318988c1b686efe428b3d4d9f711f26654a506007a30013d1946f01d3b21a1dd",
    "blockheight": 92,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "ad130241f06c44b88135b1847f8775ebccb73e849caa60bfe9e5db9a7588149b",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 9,
    "generated": true,
    "blockhash": "00920ebf768761a74b9c6a89f3a16bbf5fc1cbea6f4c8af17eb3d7bdc1db45be",
    "blockheight": 93,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "4c2c637433cd55d7809ba3ae842abf91dc3f2795bfad11cd056ac84b13d48b3d",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 8,
    "generated": true,
    "blockhash": "2f547f083680726977aa47a64303fd2fcf88c63e9ab6c0d983aab4e55dfa4011",
    "blockheight": 94,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "25e3578b8da9bc72acef85203d74bc1068bbd5b0f9e0611c07d9876a0cf85e56",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 7,
    "generated": true,
    "blockhash": "2bfc89a56cec028ef08612e5a700b475baf73eb1d7404e3d4e18d22d0fb84871",
    "blockheight": 95,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "c8c75936d15030b0090dd10b2ed8d650d1fa7657c4fcc379aa9c9642eb626b04",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 6,
    "generated": true,
    "blockhash": "67ee0490dde106367d715f5dedc13fa9a365b6551edeba1187f2fac260c91840",
    "blockheight": 96,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "c5f3031c90d5df19667019666d2cb994aaf8202d76b980f0f2a8f3c143ad353a",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 5,
    "generated": true,
    "blockhash": "2ab1cff953dc2fecb4647bead68bdf8f27670e55989234ac77be1387437ad04e",
    "blockheight": 97,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "53fa062b9e0be60e9263e048e941759f09d820b02b1a9352d3ce64bf157c3545",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 4,
    "generated": true,
    "blockhash": "699a01f27c9f4071ef5fa1db01ecee0b1cea4d717e936f5a689d90b82b40797c",
    "blockheight": 98,
    "blockindex": 0,
    "blocktime": 1602937029,
    "txid": "ee516eabe679ae6e54af57180deff4d91ce51c277c74e1b08618a5da56704242",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 3,
    "generated": true,
    "blockhash": "50851ed32add0fa33db1b4f665ca8132f2109966811aff6a3b8f7f1d103d6165",
    "blockheight": 99,
    "blockindex": 0,
    "blocktime": 1602937029,
    "txid": "896f89d0db10a0a1b00bc0bda0e774fa8e46c20d539739b8f59df1adbb358b8f",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 2,
    "generated": true,
    "blockhash": "25cc07422e00d859504bf4f7e072e9550d176860b5217c823cea5e93aef788c4",
    "blockheight": 100,
    "blockindex": 0,
    "blocktime": 1602937029,
    "txid": "47986d3580f9b9e1168f4e16cd78decf982ff7b1f75417025d69689eeb3bd9fd",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 1,
    "generated": true,
    "blockhash": "7114500ec4d179a09d609bde6cdf5d7c8f84920eca9d4f1efe102a3869591b37",
    "blockheight": 101,
    "blockindex": 0,
    "blocktime": 1602937029,
    "txid": "f759b7afcf00a9d037e37193a3d74f8e91250ceef46a8d260fc66c304aa6dc86",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  }
]

root@bitcoin_1:/# bitcoin-cli getpeerinfo
[
]
root@bitcoin_1:/# bitcoin-cli listtransactions
[
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 10,
    "generated": true,
    "blockhash": "318988c1b686efe428b3d4d9f711f26654a506007a30013d1946f01d3b21a1dd",
    "blockheight": 92,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "ad130241f06c44b88135b1847f8775ebccb73e849caa60bfe9e5db9a7588149b",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 9,
    "generated": true,
    "blockhash": "00920ebf768761a74b9c6a89f3a16bbf5fc1cbea6f4c8af17eb3d7bdc1db45be",
    "blockheight": 93,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "4c2c637433cd55d7809ba3ae842abf91dc3f2795bfad11cd056ac84b13d48b3d",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 8,
    "generated": true,
    "blockhash": "2f547f083680726977aa47a64303fd2fcf88c63e9ab6c0d983aab4e55dfa4011",
    "blockheight": 94,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "25e3578b8da9bc72acef85203d74bc1068bbd5b0f9e0611c07d9876a0cf85e56",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 7,
    "generated": true,
    "blockhash": "2bfc89a56cec028ef08612e5a700b475baf73eb1d7404e3d4e18d22d0fb84871",
    "blockheight": 95,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "c8c75936d15030b0090dd10b2ed8d650d1fa7657c4fcc379aa9c9642eb626b04",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 6,
    "generated": true,
    "blockhash": "67ee0490dde106367d715f5dedc13fa9a365b6551edeba1187f2fac260c91840",
    "blockheight": 96,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "c5f3031c90d5df19667019666d2cb994aaf8202d76b980f0f2a8f3c143ad353a",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 5,
    "generated": true,
    "blockhash": "2ab1cff953dc2fecb4647bead68bdf8f27670e55989234ac77be1387437ad04e",
    "blockheight": 97,
    "blockindex": 0,
    "blocktime": 1602937028,
    "txid": "53fa062b9e0be60e9263e048e941759f09d820b02b1a9352d3ce64bf157c3545",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 4,
    "generated": true,
    "blockhash": "699a01f27c9f4071ef5fa1db01ecee0b1cea4d717e936f5a689d90b82b40797c",
    "blockheight": 98,
    "blockindex": 0,
    "blocktime": 1602937029,
    "txid": "ee516eabe679ae6e54af57180deff4d91ce51c277c74e1b08618a5da56704242",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 3,
    "generated": true,
    "blockhash": "50851ed32add0fa33db1b4f665ca8132f2109966811aff6a3b8f7f1d103d6165",
    "blockheight": 99,
    "blockindex": 0,
    "blocktime": 1602937029,
    "txid": "896f89d0db10a0a1b00bc0bda0e774fa8e46c20d539739b8f59df1adbb358b8f",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 2,
    "generated": true,
    "blockhash": "25cc07422e00d859504bf4f7e072e9550d176860b5217c823cea5e93aef788c4",
    "blockheight": 100,
    "blockindex": 0,
    "blocktime": 1602937029,
    "txid": "47986d3580f9b9e1168f4e16cd78decf982ff7b1f75417025d69689eeb3bd9fd",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  },
  {
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "category": "immature",
    "amount": 50.00000000,
    "label": "",
    "vout": 0,
    "confirmations": 1,
    "generated": true,
    "blockhash": "7114500ec4d179a09d609bde6cdf5d7c8f84920eca9d4f1efe102a3869591b37",
    "blockheight": 101,
    "blockindex": 0,
    "blocktime": 1602937029,
    "txid": "f759b7afcf00a9d037e37193a3d74f8e91250ceef46a8d260fc66c304aa6dc86",
    "walletconflicts": [
    ],
    "time": 1602937011,
    "timereceived": 1602937011,
    "bip125-replaceable": "no"
  }
]
root@bitcoin_1:/# bitcoin-cli getnewaddress
bcrt1qfleh8qu94p6ec98pkvdqutumt89slr8pfp67x6

root@bitcoin_1:/# bitcoin-cli getnewaddress tomoichi
bcrt1qlqvsucx8kgaz7nqytke7x5af0ggp8xhk30ynxe
root@bitcoin_1:/# bitcoin-cli getbalance
50.00000000
root@bitcoin_1:/# bitcoin-cli listunspent
[
  {
    "txid": "82a2f72c85876bc460d55002edbb5ef6ad160485da1ea56ee53294d2f30a7136",
    "vout": 0,
    "address": "bcrt1qm7a39u23klsnmp332nz7kez2nhndced6ht23y8",
    "label": "",
    "scriptPubKey": "0014dfbb12f151b7e13d863154c5eb644a9de6dc65ba",
    "amount": 50.00000000,
    "confirmations": 101,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([51903fd0/0'/0'/1']0324020359d38db9f89d1e75fe3a3406b5e66d806214141e0c0ba76b685d08ff4b)#y8d0fgk6",
    "safe": true
  }
]

root@bitcoin_1:/# bitcoind -version
Bitcoin Core version v0.20.1.0-g7ff64311bee570874c4f0dfa18f518552188df08
Copyright (C) 2009-2020 The Bitcoin Core developers

Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org/> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.

This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
or <https://opensource.org/licenses/MIT>

root@bitcoin_1:/# bitcoin-cli -getinfo
{
  "version": 200100,
  "blocks": 101,
  "headers": 101,
  "verificationprogress": 1,
  "timeoffset": 0,
  "connections": 0,
  "proxy": "",
  "difficulty": 4.656542373906925e-10,
  "chain": "regtest",
  "balance": 50.00000000,
  "keypoolsize": 999,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "warnings": ""
}
root@bitcoin_1:/# bitcoin-cli getblockchaininfo
{
  "chain": "regtest",
  "blocks": 101,
  "headers": 101,
  "bestblockhash": "7114500ec4d179a09d609bde6cdf5d7c8f84920eca9d4f1efe102a3869591b37",
  "difficulty": 4.656542373906925e-10,
  "mediantime": 1602937028,
  "verificationprogress": 1,
  "initialblockdownload": false,
  "chainwork": "00000000000000000000000000000000000000000000000000000000000000cc",
  "size_on_disk": 30476,
  "pruned": false,
  "softforks": {
    "bip34": {
      "type": "buried",
      "active": false,
      "height": 500
    },
    "bip66": {
      "type": "buried",
      "active": false,
      "height": 1251
    },
    "bip65": {
      "type": "buried",
      "active": false,
      "height": 1351
    },
    "csv": {
      "type": "buried",
      "active": false,
      "height": 432
    },
    "segwit": {
      "type": "buried",
      "active": true,
      "height": 0
    },
    "testdummy": {
      "type": "bip9",
      "bip9": {
        "status": "defined",
        "start_time": 0,
        "timeout": 9223372036854775807,
        "since": 0
      },
      "active": false
    }
  },
  "warnings": ""
}

root@bitcoin_1:/# bitcoin-cli getblockhash 100
25cc07422e00d859504bf4f7e072e9550d176860b5217c823cea5e93aef788c4
root@bitcoin_1:/# bitcoin-cli getblock 25cc07422e00d859504bf4f7e072e9550d176860b5217c823cea5e93aef788c4
{
  "hash": "25cc07422e00d859504bf4f7e072e9550d176860b5217c823cea5e93aef788c4",
  "confirmations": 2,
  "strippedsize": 214,
  "size": 250,
  "weight": 892,
  "height": 100,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "47986d3580f9b9e1168f4e16cd78decf982ff7b1f75417025d69689eeb3bd9fd",
  "tx": [
    "47986d3580f9b9e1168f4e16cd78decf982ff7b1f75417025d69689eeb3bd9fd"
  ],
  "time": 1602937029,
  "mediantime": 1602937028,
  "nonce": 3,
  "bits": "207fffff",
  "difficulty": 4.656542373906925e-10,
  "chainwork": "00000000000000000000000000000000000000000000000000000000000000ca",
  "nTx": 1,
  "previousblockhash": "50851ed32add0fa33db1b4f665ca8132f2109966811aff6a3b8f7f1d103d6165",
  "nextblockhash": "7114500ec4d179a09d609bde6cdf5d7c8f84920eca9d4f1efe102a3869591b37"
}
root@bitcoin_1:/# bitcoin-cli getblockcount
101
root@bitcoin_1:/# bitcoin-cli getbestblockhash
7114500ec4d179a09d609bde6cdf5d7c8f84920eca9d4f1efe102a3869591b37

root@bitcoin_1:/# bitcoin-cli getaddressesbylabel tomoichi
{
  "bcrt1qlqvsucx8kgaz7nqytke7x5af0ggp8xhk30ynxe": {
    "purpose": "receive"
  }
}

root@bitcoin_1:/# bitcoin-cli listlabels
[
  "",
  "tomoichi"
]
root@bitcoin_1:/#

2020/11,江端さんの技術メモ

2年前のコードをAWS Lightsailに乗せられないか、docker compose up -d  を試してみたところ、変なところでエラーが出てきた。

go build cmd/server/main.go

と打ち込んでみたら

というところで、引掛っていることが分かった。

原因をググってみた「メモリ不足」。

最低でも1G用意しろ、って書いてあった。

Amazon Lightsailの一番安いやつは、512MBだった。

まあ、今時、ノートPCだって、4G搭載しているからなー、これはないかなー 。

しかし、搭載を断念するのも残念だしなー、安全を考えると2GBは欲しいしなー ・・・でも、10ドル/月かぁ。

ちょっと考えよう。

Lightsail のインスタンスのスケールアップ

(後日談) 1MBのメモリを持つ、5$/月 の インスタンスにスケールアップして、docker compose up -d を通しました。

# いや、実装に成功していたラズパイのメモリが1GBだったので、多分大丈夫だろうと踏みました。

―― が、コンテナが起動していないので、ここからが勝負です。

 

2020/11,江端さんの技術メモ

地図データの入った PostgreSQL + postGIS サーバ を関係者に配るために、Docker containerのイメージを公開する(サーバ構築手順書を作成するのが面倒だから)

1.コンテナイメージの確認

C:\Users\ebata>docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6432e639f678 postgis-pgrouting:latest "docker-entrypoint.s…" 3 months ago Up 6 hours 0.0.0.0:15432->5432/tcp toyosu_db_1

2.コンテナイメージのパッキング(commit)

C:\Users\ebata>docker commit 6432e639f678 tommurphy/toyosu_db_1
sha256:c7a1a0537fbe24d0c1371264cbd83e620a09e2ec5c328b5fbb42efb0e9454f8e

3. dockerへのログイン

C:\Users\ebata>docker login -u tommurphy
Password:
Login Succeeded

4. 外部への公開

C:\Users\ebata>docker push tommurphy/toyosu_db_1
The push refers to repository [docker.io/tommurphy/toyosu_db_1]
fcc5c725337c: Layer already exists             

fcc5c725337c: Layer already exists
a3994f456ccb: Layer already exists
.....
latest: digest: sha256:27a46f90aa1c7c9f9b5fa92877d22156144b882ba15ba4e04fe0e4fe2cb4af24 size: 4497

5. 確認

https://hub.docker.com/にアクセス

5. 相手側への連絡

「dockerをインストールしたマシンで、"docker pull tommurphy/toyosu_db_1" とコマンド投入しろ」

「で、そのあと、$ docker run -it tommurphy/toyosu_db_1 bash とコマンド投入しろ」

 

と連絡する。

(とりあえず、Windows10で作ったイメージを、Amazon Lightsailの ubuntu20.04に入れることまでは成功した。動くかどうかは不明)

→ ダメ。データベースすっからかんのコンテナができた。もうちょっと嵌る必要があるなぁ

というか、そもそもDockerコンテナとはそういうものらしい("docker" "postgresql" "永続化"、あたりでググってみる)

現在、PostgreSQLをデータごとDockerコンテナ化するを読んでいる。

 

 

2020/11,江端さんの技術メモ

私が使っているQGIS3の地図と地物情報を、先方に送りたいのですが、先方に「DB構築してくれ」とは言えない場合があります(というか、殆どの場合がそうだろう)。

# で、今、実際にそんな状況になっている。

最初、qgzファイルを送付すれば足る、とか思っていたのですが、甘かったようです(qgzファイルはプロジェクト情報しか送付できない)

で、QGIS3を色々触っているうちに、なんかファイルができたような気がするので、自分用のメモとして残しておきます。

以上(現在、先方の成否報告待ち)。

キーワード:gpkg QGIS3 地物情報 先方にメールで送付

 

2020/11,未分類,江端さんの技術メモ

以下、自分用のメモのみ

AWS  Lightsailにdockerのインストールまで成功

PostgreSQLのインストールも成功したと思う

が、ここから嵌り始める。

ca_sim=# create extension postgis;

^C^CCancel request sent
Cancel request sent
ERROR: canceling statement due to user request
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>

が出てきて、

サーバ側に
2020-11-04 12:52:16.858 UTC [51] ERROR: canceling statement due to user request
2020-11-04 12:52:16.858 UTC [51] STATEMENT: create extension postgis;
2020-11-04 12:53:53.365 UTC [1] LOG: server process (PID 51) was terminated by signal 9: Killed
2020-11-04 12:53:53.365 UTC [1] DETAIL: Failed process was running: create extension postgis;
2020-11-04 12:53:53.365 UTC [1] LOG: terminating any other active server processes
2020-11-04 12:53:53.367 UTC [25] WARNING: terminating connection because of crash of another server process
2020-11-04 12:53:53.367 UTC [25] DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2020-11-04 12:53:53.367 UTC [25] HINT: In a moment you should be able to reconnect to the database and repeat your command.
2020-11-04 12:53:53.371 UTC [53] WARNING: terminating connection because of crash of another server process
2020-11-04 12:53:53.371 UTC [53] DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2020-11-04 12:53:53.371 UTC [53] HINT: In a moment you should be able to reconnect to the database and repeat your command.
2020-11-04 12:53:53.372 UTC [56] WARNING: terminating connection because of crash of another server process
2020-11-04 12:53:53.372 UTC [56] DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2020-11-04 12:53:53.372 UTC [56] HINT: In a moment you should be able to reconnect to the database and repeat your command.
2020-11-04 12:53:53.516 UTC [1] LOG: all server processes terminated; reinitializing
2020-11-04 12:53:53.535 UTC [58] FATAL: the database system is in recovery mode
2020-11-04 12:53:53.538 UTC [57] LOG: database system was interrupted; last known up at 2020-11-04 12:47:18 UTC
2020-11-04 12:53:53.607 UTC [57] LOG: database system was not properly shut down; automatic recovery in progress
2020-11-04 12:53:53.613 UTC [57] LOG: redo starts at 0/216DCD0
2020-11-04 12:53:53.712 UTC [57] LOG: invalid record length at 0/24F2310: wanted 24, got 0
2020-11-04 12:53:53.712 UTC [57] LOG: redo done at 0/24F22D8
2020-11-04 12:53:53.741 UTC [1] LOG: database system is ready to accept connections

そこで、

コンテナの外に出て、

sudo apt-get clean
sudo apt-get install postgis
sudo apt-get update

■全部のDockerを止める
C:\Users\ebata>docker ps -aq | xargs docker stop
C:\Users\ebata>docker ps -aq | xargs docker rm (これやると、これまでの設定も全滅するので注意)

もう一度、imageから作り直して ・・(30分経過)・・ううむ、それでもダメか。

今日はここで一旦引き上げ

2020/11,江端さんの技術メモ

正直手続忘れてしまったけど、一応historyからメモを作成しておきます。
https://docs.docker.com/engine/install/ubuntu/

$ sudo apt-get remove docker docker-engine docker.io containerd runc
$ sudo apt-get update
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

ここからコケ始めました。

$ apt-cache madison docker-ce

の後、

$ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io

を入力したら、予想通り失敗しました。

(ちょっと一息)

$ apt-cache madison docker-ce

を入力した時、一番最初に表示された"5:19.03.13~3-0~ubuntu-focal" を訳も分からずに、置き換えしました。

$sudo apt-get install docker-ce=5:19.03.13~3-0~ubuntu-focal docker-ce-cli=5:19.03.13~3-0~ubuntu-focal containerd.io

でもって、

$ sudo docker run hello-world

をして、コメントに出てくる通りに、

$ docker run -it ubuntu bash

を実施しても"Got permission denied....." とか言われて、dockerのコンテナの中に入ることができませんでした。

$ docker ps

Got permission denied while trying to connect to the Docker daemon
socket at unix:///var/run/docker.sock:
Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json:
dial unix /var/run/docker.sock: connect: permission denied

てなエラーが出てくるので、このエラーメッセージで検索したところ、

# dockerグループへユーザを追加
$ sudo gpasswd -a ubuntu docker

# グループの追加ができたことを確認
$ id ubuntu

と入力して、(ここ大事)

# 一回ログアウトして再ログインする
$ exit

して、再度

$ sudo docker run hello-world
$ docker run -it ubuntu bash

をしたら、今度はコンテナの中に入ることができました。

ubuntu@ip-172-26-13-137:~$ docker run -it ubuntu bash
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
6a5697faee43: Pull complete
ba13d3bc422b: Pull complete
a254829d9e55: Pull complete
Digest: sha256:fff16eea1a8ae92867721d90c59a75652ea66d29c05294e6e2f898704bdb8cf1
Status: Downloaded newer image for ubuntu:latest
root@e9ff5fa891d0:/# ;s
bash: syntax error near unexpected token `;'
root@e9ff5fa891d0:/# ls
bin   dev  home  lib32  libx32  mnt  proc  run   srv  tmp  var
boot  etc  lib   lib64  media   opt  root  sbin  sys  usr

よく分からんけど、これで、Amazon Lightsailの中にDockerをインストールすることができたんだろう・・・と思っています。

2020/11,江端さんの技術メモ

イプシムのSIM(IPアドレス付きで、一番安いやつ)が、ラズパイに差さったままで使っていなかったので、iPadで使えるようにした。必要に応じて、またラズパイに戻せばいいし。

  1. SIM取り出し用の機具の準備

  2. イプシムのSIMカード情報の確認(画像は偽造しています)

  3. SIMカード番号の確認 (上記のICCIDと同じであるかを確認(画像は偽造しています))

3. iPadのスロットに挿入する

4. iPadから、https://ipsim.net/support.html にアクセスし、APN構成プロファイルをダウンロードする

これをダウンロードするのだが、これがインストールできているどうかが、確認できずに困った(インストールボタンが見あたらなかったから)。この場合は、「設定」で調べる。

ちなみに、以下の情報が必要なのかは分からないが一応セットしておいた。

 

5. iPadから、https://ipsim.net/support.html にアクセスし、APN構成プロファイルをダウンロードする(画像は偽造しています)

上記の赤い囲みに数字が出てくれば、インストールできている(と思う)。

7.右上にこの表示が出てくれば、SIMカードは稼動している(最初のうち、ブラウザが表示されなかったりするが時間が経過すると見えるようになる(ことがあるみたい)。表示されずに、なんども、手順をやりなおしていたが、"放置"が正解だったような気がする)

以上

2020/10,江端さんの技術メモ

昨夜、らくがきのように綴った

Let’s encrypt を試してみた件(整理は明日)

を、まとめておきます。

昨日の実験で、Amazon lightsail でも、自前の公開暗号鍵(Let’s encrypt)を使えることが分かって、昨夜から気分の良い私です ―― これで、3.5ドル/月の、個人AWS練習用サーバの目処が立った。

どうも、私、"Let’s encrypt"を含めて、どうも私は公開暗号鍵の取扱いを、色々勘違いしていたようです。

たとえば、こちら、とか、こちら、で、AWSのロードバランサー(ELB: Amazon Elastic Load Balancing)に、"Let’s encrypt"で作った公開暗号鍵を関連付ける作業について記載しています。

しかし、AWSの供与をして頂いた部署が、IAMの設定を理解しておらず(もちろん、私も理解していませんでしたが)、 公開暗号鍵がロードバランサに紐付かずに、この時は、地獄を見ました

"Let’s encrypt"を使った認証鍵と暗号鍵を生成する時に、引数に、httpサーバの起動状態やら、鍵の置き場所などを指定するものだから、私は上位の認証局が、下々(私)の認証鍵と暗号鍵を見張っていると思っていました。

しかし、昨夜のGolandのコーディングで、認証鍵と暗号鍵は、有効期限付きのただのファイルである、ということを理解しました。

公開鍵証明書の認証局(CA: Certificate Authority)は、「下々のもの(私)に頼まれて、上位認証局(お上)が、鍵(ファイル)を作っているだけ」 ―― とりあえずは、この理解で十分であることが分かりました。

# というか ―― 巷(ちまた)の説明、難しすぎる。

まあ、それはさておき。

今回試みた、Let’s encryptでの鍵作りについて説明します(前提は、こちらを読んでおいて下さい)。

Let’s encryptでの鍵作りのパラメータは、省略することができるようです

$sudo certbot certonly --webroot -w /var/www/html -d sea-anemone.tech -d www.sea-anemone.tech

$sudo certbot certonly  -w /home/ubuntu/go_template/server_test -d sea-anemone.tech

  • "--webroot"は、webサーバの稼動している状況で扱う(しかもhttp://(×https://)が通らないとダメだめらしい)
  • "-w"以下は、golangのサーバを動かしている(サーバプログラムのある)ディレクトリを記載するらしい
  • "-d"以下は、SSLで使うドメイン名を入力("www.sea-anemone.tech"は、なんか知らんけど拒否された。理由は不明だけど、まあ、今は使っていないので無視する)

てな感じで、「とにかく鍵作ってくれ!」と頼むと、

How would you like to authenticate with the ACME CA? 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1: Spin up a temporary webserver(standalone)  (一時的なWebサーバを単独で起動する) 
2: Place files in webroot directory (webroot)ファイルを webroot ディレクトリに配置 する(webroot) 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

となっていて、少なくとも、nginxなどのwebサーバ上げていない状態だから、少くとも"2"ではなく、"1"でを押下したら、

IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at:
 /etc/letsencrypt/live/sea-anemone.tech/fullchain.pem 
Your key file has been saved at: 
/etc/letsencrypt/live/sea-anemone.tech/privkey.pem

という場所に鍵を作ってくれた様子。

ところが、この鍵、普通のmoreやlessでは見えずに、sudo more などとしないと見えないし、privkey.pemについては、それすらも見えない、という慎重さです。

とにかく、golangのサーバを動かしている(サーバプログラムのある)ディレクトリにコピーしました。

ubuntu@ip-172-26-13-137:~/go_template/server_test$ sudo cp /etc/letsencrypt/live/sea-anemone.tech/fullchain.pem . 
ubuntu@ip-172-26-13-137:~/go_template/server_test$ sudo cp /etc/letsencrypt/live/sea-anemone.tech/privkey.pem .

そんでもって、privkey.pemの権限が厳しいので、危ないけど >chmod +777 privkey.pem をやって、golangからアクセスして貰えるようにしておきました(権限のモードを忘れた)。こうしないと、go run serverXX.goをやると「privkey.pemが読めん」と文句を言われます。

で、serverXX.goの中を書き換え

/*
                log.Fatal(http.ListenAndServe(*addr, nil)) // localhost:8080で起動をセット
        */

        /*
        var httpErr error
        if _, err := os.Stat("./algo.crt"); err == nil {
                fmt.Println("file ", "algo.crt found switching to https")
                if httpErr = http.ListenAndServeTLS(*addr, "./algo.crt", "./algo.key", nil); httpErr != nil {
                        log.Fatal("The process exited with https error: ", httpErr.Error())
                }
        } else {
                httpErr = http.ListenAndServe(*addr, nil)
                if httpErr != nil {
                        log.Fatal("The process exited with http error: ", httpErr.Error())
                }
        }
        */

        var httpErr error
        if _, err := os.Stat("./fullchain.pem"); err == nil {
                fmt.Println("file ", "fullchain.pem found switching to https")
                if httpErr = http.ListenAndServeTLS(*addr, "./fullchain.pem", "./privkey.pem", nil); httpErr != nil {
                        log.Fatal("The process exited with https error: ", httpErr.Error())
                }
        } else {
                httpErr = http.ListenAndServe(*addr, nil)
                if httpErr != nil {
                        log.Fatal("The process exited with http error: ", httpErr.Error())
                }
        }

としたら、iPadで

https://sea-anemone.tech:8080
https://sea-anemone.tech:8080/smartphone

も、問題なく出力されるようになりました。

とりあえず、PruneMobileを雲の上に上げるメドが付き、ようやく一安心です。