0

tootsuite/mastodon - Docker Hub

Officalとは書いていないですが、おそらく上記が作者自身がつくったDockerイメージだと思います。

docker run してみたところ下記のようになりました

% docker run tootsuite/mastodon
tini (tini version 0.18.0 - git.fec3683)
Usage: tini [OPTIONS] PROGRAM -- [ARGS] | --version

Execute a program under the supervision of a valid init process (tini)

Command line options:

  --version: Show version and exit.
  -h: Show this help message and exit.
  -s: Register as a process subreaper (requires Linux >= 3.4).
  -p SIGNAL: Trigger SIGNAL when parent dies, e.g. "-p SIGKILL".
  -v: Generate more verbose output. Repeat up to 3 times.
  -w: Print a warning when processes are getting reaped.
  -g: Send signals to the child's process group.
  -e EXIT_CODE: Remap EXIT_CODE (from 0 to 255) to 0.
  -l: Show license and exit.

Environment variables:

  TINI_SUBREAPER: Register as a process subreaper (requires Linux >= 3.4).
  TINI_VERBOSITY: Set the verbosity level (default: 1).
  TINI_KILL_PROCESS_GROUP: Send signals to the child's process group.

tootsuite/mastodon - Docker Hub

The repository includes deployment configurations for Docker and docker-compose, but also a few specific platforms like Heroku, Scalingo, and Nanobox. The stand-alone installation guide is available in the documentation.

とあります。ということで

Installing from source - Mastodon documentation

を見てみても、Dockerに関する記述がなさそうに思います。

Dockerに詳しい人なら、docker run した結果である

tini (tini version 0.18.0 - git.fec3683)
Usage: tini [OPTIONS] PROGRAM -- [ARGS] | --version

あたりから推測が効いて環境を構築していくことが可能なのでしょうか?

もしくは

The repository includes deployment configurations for Docker and docker-compose

とある repository とは https://github.com/tootsuite/mastodon のことでしょうか?
たしかに docker-compose がありました。これをいい感じにつかうのでしょうか?(いい感じとは?)

https://github.com/tootsuite/mastodon には、Dockerfile もあります。この場合は、docker pull tootsuite/mastodon のようにDocker Hubからイメージを持ってくるのではなくて、Dockerファイルから自分自身でイメージを作るんでしょうか?それともどっちでもいいんで、docker-composeを使えばいいんでしょうか。

1

1 件の回答 1

0

そのDocker Imageを見ると、

# Precompile assets
RUN cd ~ && \
    OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
    yarn cache clean

# Set the work dir and the container entry point
WORKDIR /opt/mastodon
ENTRYPOINT ["/tini", "--"]
EXPOSE 3000 4000

を実行しています。
そこでtiniの公式を見ると、

In Docker, you will want to use an entrypoint so you don't have to remember to manually invoke Tini:

# Add Tini
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]

# Run your program under Tini
CMD ["/your/program", "-and", "-its", "arguments"]
# or docker run your-image /your/program ...

とのことですので、そのようにdocker runしてあげればよいかと。

この質問に回答するには、ログインする必要があります。

求めていた回答ではありませんか? のタグが付いた他の質問を参照する。