首页 > 其他分享 >云原生之使用Docker部署Laverna笔记工具

云原生之使用Docker部署Laverna笔记工具

时间:2023-06-10 11:01:21浏览次数:59  
标签:原生 11 00 complete server001 Laverna 2022 Docker docker

(云原生之使用Docker部署Laverna笔记工具)

一、Laverna介绍

Laverna是一个开源的、用 JavaScript 编写的笔记网络应用程序,可以部署在个人服务器上使用。

二、检查本地环境状态

1.检查系统版本

[root@server001 ~]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

2.检查docker状态

[root@server001 ~]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-11-06 06:02:26 CST; 1 weeks 2 days ago
     Docs: https://docs.docker.com
 Main PID: 9869 (dockerd)
    Tasks: 29
   Memory: 2.4G
   CGroup: /system.slice/docker.service
           ├─  9869 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
           ├─116625 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8765 -container-ip 172.17.0.2 -container-port 80
           └─116630 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8765 -container-ip 172.17.0.2 -container-port 80

Nov 14 22:30:23 server001 dockerd[9869]: time="2022-11-14T22:30:23.149457043+08:00" level=info msg="Container failed to exit within 10s ...03a5f88d
Nov 14 22:30:23 server001 dockerd[9869]: time="2022-11-14T22:30:23.191892564+08:00" level=info msg="ignoring event" container=672c3438d9...kDelete"
Nov 14 22:41:26 server001 dockerd[9869]: time="2022-11-14T22:41:26.110484832+08:00" level=info msg="ignoring event" container=37a7401ce7...kDelete"
Nov 14 23:00:03 server001 dockerd[9869]: time="2022-11-14T23:00:03.899436227+08:00" level=info msg="Container failed to exit within 10s ...dde0d014
Nov 14 23:00:03 server001 dockerd[9869]: time="2022-11-14T23:00:03.942747053+08:00" level=info msg="ignoring event" container=7c726140a1...kDelete"
Nov 14 23:07:40 server001 dockerd[9869]: time="2022-11-14T23:07:40.338292217+08:00" level=info msg="ignoring event" container=9c78d5b9d1...kDelete"
Nov 14 23:07:40 server001 dockerd[9869]: time="2022-11-14T23:07:40.556135522+08:00" level=info msg="ignoring event" container=1932d4e66d...kDelete"
Nov 14 23:32:22 server001 dockerd[9869]: time="2022-11-14T23:32:22.670922544+08:00" level=info msg="ignoring event" container=60235239f1...kDelete"
Nov 14 23:32:22 server001 dockerd[9869]: time="2022-11-14T23:32:22.855970045+08:00" level=info msg="ignoring event" container=c4a43ebc18...kDelete"
Nov 14 23:32:23 server001 dockerd[9869]: time="2022-11-14T23:32:23.088696932+08:00" level=info msg="ignoring event" container=e1bec0a05f...kDelete"
Hint: Some lines were ellipsized, use -l to show in full.

三、下载Laverna镜像


[root@server001 ~]# docker pull thklein/laverna
Using default tag: latest
latest: Pulling from thklein/laverna
Image docker.io/thklein/laverna:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
6ffe5d2d6a97: Pull complete 
f4e00f994fd4: Pull complete 
e99f3d1fc87b: Pull complete 
a3ed95caeb02: Pull complete 
ededd75b6753: Pull complete 
1ddde157dd31: Pull complete 
b1fa3eb3cc18: Pull complete 
a1704470ed47: Pull complete 
3dd83205b755: Pull complete 
49a5665b2cca: Pull complete 
93d2530c6321: Pull complete 
eb4c934836f7: Pull complete 
665c57aee3f3: Pull complete 
Digest: sha256:c738d0f72de7caf8123eaf786dbc4971bf4adc8abb3e27fbd3991bc8a1933302
Status: Downloaded newer image for thklein/laverna:latest
docker.io/thklein/laverna:latest


四、部署Laverna

1.运行Laverna容器


[root@server001 ~]# docker run -d --name laverna -p 80:80 thklein/laverna:latest
16539a40754c3f059bd01c04e713046fd6142e0c7be3b59647e866ec1f9adbeb


2.查看Laverna容器状态

[root@server001 ~]# docker ps
CONTAINER ID   IMAGE                          COMMAND                  CREATED          STATUS          PORTS                                   NAMES
16539a40754c   thklein/laverna:latest         "/bin/sh -c 'supervi…"   10 seconds ago   Up 10 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp       laverna




3.查看容器运行日志


[root@server001 ~]# docker logs laverna 
2022-11-15 05:09:48,499 CRIT Supervisor running as root (no user in config file)
2022-11-15 05:09:48,500 INFO supervisord started with pid 7
2022-11-15 05:09:49,503 INFO spawned: 'nginx' with pid 10
2022-11-15 05:09:49,504 INFO spawned: 'php5-fpm' with pid 11
2022-11-15 05:09:50,516 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-11-15 05:09:50,517 INFO success: php5-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

五、设置Laverna登录密码

image.png

六、访问Laverna

image.png image.png

标签:原生,11,00,complete,server001,Laverna,2022,Docker,docker
From: https://blog.51cto.com/u_14664141/6454276

相关文章

  • docker 核心原理
    docker网络docker安装后自动创建3种网络dockernetworkls查看:bridgehost类似Vmware的NAT模式。none通过dockerinfo可见支持的网络类型:Network:bridgehostipvlanmacvlannulloverlaydocker使用Linux桥接网卡,在宿主机虚拟一个docker容器网桥(docker0),docker启动......
  • Docker配置完镜像加速重启失败
    systemctlstatusdocker-l●docker.service-DockerApplicationContainerEngineLoaded:loaded(/usr/lib/systemd/system/docker.service;enabled;vendorpreset:disabled)Active:failed(Result:start-limit)since六2023-06-1009:09:01CST;1m......
  • 构建编译dockerfile docker build报错make: uname: Operation not permitted
    报错信息:查看docker版本#docker-vDockerversion1.13.1,build7d71120/1.13.1在dockerfile中我使用的基础镜像为FROMalpine:3.16.5解决办法是升级docker或者降低Alpine的版本,我这边选择升级docker版本卸载现有docker版本#yum-yremove$(rpm-qa|grepdocker......
  • 带你体验AI系列之云原生最佳实践--免费体验GPT-4教程
    前言​【GPT-4】是OpenAI最新推出的大型语言模型,它支持图像和文本输入,以文本形式输出。它比GPT-3.5更大、更强、更猛。最重要的是据与研究表明,他在某些场景下,可以通过图灵测试。但是,却缺点是收费,不像GPT-3.5那样容易白嫖。不过今天我就带你嫖一手,真香警告!本教程可称为云原生......
  • 003Arch安装docker
    链接:ArchLinux安装Docker并简单配置_archlinuxdocker_陌年微凉II的博客-CSDN博客安装dockerpacman-Sdocker开启docker服务#开启Docker服务systemctlstartdocker#允许Docker服务开机自启动systemctlenabledocker#验证Docker服务运行状态systemctlsta......
  • 004Arch的Docker卸载
    链接:Arch下面安装docker-Docker安装手册-docker中文社区Arch下面删除Docker删除Docker包。sudopacman-Rdocker删除Docker包,同时删除其依赖的包。sudopacman-Rnsdocker删除Docker运行过程中产生的镜像、容器等文件。用户生成的配置文件需要手工删除。r......
  • 005Arch中Docker的基本使用---容器
    外链:Docker-ArchWiki(archlinux.org)Docker容器使用|菜鸟教程(runoob.com)输出Helloworlddockerrun-it--rmarchlinuxbash-c"echohelloworld"各个参数解析:-docker:Docker的二进制执行文件-run:与前面的docker组合来运行一个容器--it:---rm:-......
  • 006Arch中Docker的基本使用---可视化界面(portainer)
    外链:Docker入门到实践(九)docker可视化界面portainer的安装与使用_零碎de記憶的博客-CSDN博客InstallPortainerBEwithDockeronWSL/DockerDesktop-PortainerDocumentation安装portainer查询前10个Portainer镜像dockersearchportainer--limit10拉取Po......
  • Docker中拉取mysql后无法连接
    在Linux系统中,你可以使用以下命令停止MySQL服务:sudosystemctlstopmysql启动MySQL服务,并跳过权限验证:sudomysqld_safe--skip-grant-tables&在这个命令中,--skip-grant-tables参数将禁止MySQL对用户身份进行验证,因此你可以直接登录到MySQL服务器,而不需要输入......
  • Docker CLI docker events 常用命令
    Docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的Linux或Windows操作系统的机器上,也可以实现虚拟化。Docker是内核虚拟化,不使用Hypervisor是不完全虚拟化,依赖内核的特性实现资源隔离。本文主要介绍DockerCLI中d......