docker composeを使って「spiderfoot」を構築する

docker composeを使って「spiderfoot」を構築する

docker composerを利用して情報収集ツールである「Graphite」を構築するまでの手順を記述してます。

環境

  • OS CentOS Linux release 7.9.2009 (Core)
  • docker 20.10.2
  • docker-compose 1.25.4

docker-compos.ymlダウンロード

github上に存在するのでダウンロードします。

wget https://raw.githubusercontent.com/treemo/docker-spiderfoot/master/docker-compose.yml

ファイルの中は以下のようになってます。
※外部からアクセスするので「ports」だけ変更してます。

# init:
#     touch spiderfoot.db

version: '2'

services:
  spiderfoot:
    image: treemo/spiderfoot
    container_name: spiderfoot
    ports:
      - 0.0.0.0:8080:8080
    volumes:
      - ./spiderfoot.db:/usr/src/app/spiderfoot.db
      - /etc/localtime:/etc/localtime:ro
    cpu_shares: 73
    cpu_quota: 50000
    cpuset: 0,0
    mem_limit: 2g
    memswap_limit: 2g

spiderfoot構築

DBを作成しておきます。

touch spiderfoot.db

起動します。

docker-compose up -d

Creating network "spiderfoot_default" with the default driver
Pulling spiderfoot (treemo/spiderfoot:)...
latest: Pulling from treemo/spiderfoot
f2b6b4884fc8: Pull complete
4fb899b4df21: Pull complete
74eaa8be7221: Pull complete
2d6e98fe4040: Pull complete
414666f7554d: Pull complete
bb0bcc8d7f6a: Pull complete
ace2d3087f57: Pull complete
da74659b9184: Pull complete
1c2db6d7abd0: Pull complete
858c1d2ae969: Pull complete
75c25d25db20: Pull complete
1c98e12d8373: Pull complete
e25470530ad4: Pull complete
4e39011454ad: Pull complete
e30b1c0acf28: Pull complete
16306646e2d9: Pull complete
857412f5d63f: Pull complete
9fb57092777b: Pull complete
Digest: sha256:927a3ba3ac5118e0fa532f884fdbf2a2830c74996a64723748c106a3fdf39c07
Status: Downloaded newer image for treemo/spiderfoot:latest
Creating spiderfoot ... done
Attaching to spiderfoot
spiderfoot    | [08/Apr/2021:11:46:51] ENGINE Listening for SIGHUP.
spiderfoot    | [08/Apr/2021:11:46:51] ENGINE Listening for SIGTERM.
spiderfoot    | [08/Apr/2021:11:46:51] ENGINE Listening for SIGUSR1.
spiderfoot    | [08/Apr/2021:11:46:51] ENGINE Bus STARTING
spiderfoot    | [08/Apr/2021:11:46:51] ENGINE Started monitor thread '_TimeoutMonitor'.
spiderfoot    | [08/Apr/2021:11:46:51] ENGINE Serving on http://0.0.0.0:8080
spiderfoot    | [08/Apr/2021:11:46:51] ENGINE Bus STARTED
spiderfoot    | Starting web server at http://0.0.0.0:8080 ...

ブラウザから http://プライベートIP or サーバーアドレス:8080 にアクセスします。

これで構築は完了です。画面上部の「New Scan」をクリックすると「scan」を開始することが可能です。