当前位置: 首页 > 软件库 > 云计算 > >

docker-mastodon

授权协议 MIT License
开发语言 Java
所属分类 云计算
软件类型 开源软件
地区 不详
投 递 者 从阎宝
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

wonderfall/mastodon

Your self-hosted, globally interconnected microblogging community.

Mastodon official website and source code.

Why this image?

This non-official image is intended as an all-in-one (as in monolithic) Mastodon production image. You should use the official image for development purpose or if you want scalability.

Security

Don't run random images from random dudes on the Internet. Ideally, you want to maintain and build it yourself.

Images are scanned every day by Trivy for OS vulnerabilities. They are rebuilt once a week, so you should often update your images regardless of your Mastodon version.

Features

  • Rootless image
  • Based on Alpine Linux
  • Includes hardened_malloc
  • Precompiled assets for Mastodon

Tags

  • latest : latest Mastodon version (or working commit)
  • x.x : latest Mastodon x.x (e.g. 3.4)
  • x.x.x : Mastodon x.x.x (including release candidates)

You can always have a glance here.

Build-time variables

Variable Description Default
MASTODON_VERSION version/commit of Mastodon N/A
REPOSITORY source of Mastodon tootsuite/mastodon

Environment variables you should change

Variable Description Default
UID user id (rebuild to change) 991
GID group id (rebuild to change) 991
RUN_DB_MIGRATIONS run migrations at startup true
SIDEKIQ_WORKERS number of Sidekiq workers 5

Don't forget to provide an environment file for Mastodon itself.

Volumes

Variable Description
/mastodon/public/system data files
/mastodon/log logs

Ports

Port Use
3000 Mastodon web
4000 Mastodon streaming

docker-compose example

Please use your own settings and adjust this example to your needs.Here I use Traefik v2 (already configured to redirect 80 to 443 globally).

version: '2.4'

networks:
  http_network:
    external: true

  mastodon_network:
    external: false
    internal: true

services:
  mastodon:
    image: ghcr.io/wonderfall/mastodon
    container_name: mastodon
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    env_file: /wherever/docker/mastodon/.env.production
    depends_on:
      - mastodon-db
      - mastodon-redis
    volumes:
      - /wherever/docker/mastodon/data:/mastodon/public/system
      - /wherever/docker/mastodon/logs:/mastodon/log
    labels:
      - traefik.enable=true
      - traefik.http.routers.mastodon-web-secure.entrypoints=https
      - traefik.http.routers.mastodon-web-secure.rule=Host(`domain.tld`)
      - traefik.http.routers.mastodon-web-secure.tls=true
      - traefik.http.routers.mastodon-web-secure.middlewares=hsts-headers@file
      - traefik.http.routers.mastodon-web-secure.tls.certresolver=http
      - traefik.http.routers.mastodon-web-secure.service=mastodon-web
      - traefik.http.services.mastodon-web.loadbalancer.server.port=3000
      - traefik.http.routers.mastodon-streaming-secure.entrypoints=https
      - traefik.http.routers.mastodon-streaming-secure.rule=Host(`domain.tld`) && PathPrefix(`/api/v1/streaming`)
      - traefik.http.routers.mastodon-streaming-secure.tls=true
      - traefik.http.routers.mastodon-streaming-secure.middlewares=hsts-headers@file
      - traefik.http.routers.mastodon-streaming-secure.tls.certresolver=http
      - traefik.http.routers.mastodon-streaming-secure.service=mastodon-streaming
      - traefik.http.services.mastodon-streaming.loadbalancer.server.port=4000
      - traefik.docker.network=http_network
    networks:
      - mastodon_network
      - http_network
 
   mastodon-redis:
    image: redis:alpine
    container_name: mastodon-redis
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    volumes:
      - /wherever/docker/mastodon/redis:/data
    networks:
      - mastodon_network

  mastodon-db:
    image: postgres:9.6-alpine
    container_name: mastodon-db
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    volumes:
      - /wherever/docker/mastodon/db:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=mastodon
      - POSTGRES_DB=mastodon
      - POSTGRES_PASSWORD=supersecretpassword
    networks:
      - mastodon_network

This image has been tested and works great with the gVisor runtime.

  • linux版本:Ubuntu16.04 第一次安装Docker,运行docker命令是可以的,如 docker ps 重启系统之后,运行docker ps后出现如下报错: Cannot connect to the Docker daemon. Is the docker daemon running on this host? 查找资料后,知道了这是权限问题。需要root用户才能运行。 从0.5

  •     docker-compose可以一次性开启多个docker实例,这一点比Dockerfile来构建docker容器要方便的多。docker-compose的重点是对yml文件的配置。yml文件的配置需要注意的是严格控制缩进。     需要说明的一点是docker-compose命令并不是随着docker安装一起安装的,他需要额外的安装,如果没有安装,可以在github上下载对应系统的版本:

  • version: '2' services: mongodb: image: mongo:latest container_name: "mongodb" restart: always environment: - MONGO_DATA_DIR=/data/db - MONGO

  • 原因 出现这种提示是因为系统中没有安装docker-compose导致,所以只要安装上就可以。 解决方案 Linux环境 下载安装文件 sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/d

  • docker_compose.yml内容如下 其中/usr/local/config.toml路径可以更改,我是将config.toml放在/usr/local路径下的 version: '2' services: monstache: image: rwynn/monstache:rel6 restart: always container_name: monst

  • 准备 compose文件 创建mongodb-compose.yaml文件,复制下面内容到其中 version: '3.8' services: mongo: container_name: mongo image: mongo:5.0 # 可以修改为自己需要的版本 restart: always ports: - 27017:27017 vo

  • 首先建立mongodb的初始化bash, 后面会放入docker-compose.yml mongo-init.sh mongo -- "$MONGO_INITDB_DATABASE" <<EOF db = db.getSiblingDB('admin') db.auth('$MONGO_INITDB_ROOT_USERNAME', '$MONGO_INITDB_ROOT_PASSWORD') d

  • 想部署腾讯开源的femas发现网上没有对应镜像,无奈只能自己制作了一个。 docker部署 docker run --restart=always -p 8080:8080 -p 5555:5555 --name=femas-test -d aabbccjin/femas:1.1.0 docker-compose部署 version: '3' services: femas: conta

  • /etc/docker/daemon.json { "graph": "/data/docker", "storage-driver": "overlay2", "insecure-registries": ["registry.access.redhat.com","quay.io","harbor.od.com"], "registry-mirrors": ["https://

 相关资料
  • mastodon-docker Build and push assets-precompiled Mastodon Docker image using CircleCI. Currently we support only AWS ECR as Docker image repository.Contributions are welcome to support other reposito

  • 一、解决的问题 二、与虚拟机的比较 三、优势 四、使用场景 五、镜像与容器 参考资料 一、解决的问题 由于不同的机器有不同的操作系统,以及不同的库和组件,在将一个应用部署到多台机器上需要进行大量的环境配置操作。 Docker 主要解决环境配置问题,它是一种虚拟化技术,对进程进行隔离,被隔离的进程独立于宿主操作系统和其它隔离的进程。使用 Docker 可以不修改应用程序代码,不需要开发人员学习特定环

  • 我检查了垃圾箱,里面没有ping

  • 第一章 Docker介绍1 1.1 docker简介 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的\[Linux\]机器上,也可以实现\[虚拟化\]。容器是完全使用\[沙箱\]机制,相互之间不会有任何接口。 1.2 Docker是什么? Docker是一个程序运行、测试、交付的开放平台,Docker被设计为能够使你快速地交

  • 推荐使用 Swoole 官方 Docker:https://github.com/swoole/docker-swoole

  • Docker Commands Commands Notes docker ps -a Show all containers on the system docker ps Show only currently running containers docker run <NAME> Creates & runs a docker container via an image docker i