跳至主要內容
解决因安装应用宝等安卓模拟器导致docker无法启动的问题

因想试试在电脑上玩玩手机游戏,为此安装腾讯应用宝,结果启动docker后,docker无法启动,报错如下:

Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS. 

此为解决方案


Mr.Twan大约 2 分钟主机运维Windowswls2docker
Conda 简单安装和使用教程

Miniconda3 在 Windows 环境下的安装和基本使用指南。这个教程将帮助你配置 PATH 环境变量、创建和激活虚拟环境,并运行 Python 程序。


Mr.Twan大约 3 分钟编程笔记pythonConda
cloudreve 捐赠版镜像构建

一. 下载捐赠版源码修改dockerFile

PS: dockerFile当前将key.bin也就是捐赠版密钥添加到了镜像中,实际上可以不加,此时和应该将
dockerFile中的 --- "ADD key_20230114.bin ./" 此行删除,并在随后的 `docker-compose.yml` 中加入key的映射
FROM golang:1.18-alpine as cloudreve_builder

# install dependencies and build tools
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
    && apk update \
    && apk add --no-cache wget curl git yarn build-base gcc abuild binutils binutils-doc gcc-doc zip \
    && yarn config set registry https://mirrors.cloud.tencent.com/npm/ \
    && yarn config get registry \
    && yarn config set "strict-ssl" false -g \
    && go env -w GOPROXY=https://goproxy.cn

WORKDIR /cloudreve_builder
COPY . .

# build frontend
WORKDIR /cloudreve_builder/assets
# Disable sourcemap in production envitonment
ENV GENERATE_SOURCEMAP false
# Disable new OpenSSL to prevent 0308010C:digital envelope routines::unsupported
ENV NODE_OPTIONS --openssl-legacy-provider

RUN yarn install --network-timeout 600000
RUN yarn run build

# build backend
WORKDIR /cloudreve_builder
RUN zip -r - assets/build >assets.zip \
    && go build -a -o cloudreve


# build final image
FROM alpine:latest

WORKDIR /cloudreve

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
    && apk update && apk add --no-cache tzdata

# we using the `Asia/Shanghai` timezone by default, you can do modification at your will
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone

COPY --from=cloudreve_builder /cloudreve_builder/cloudreve ./
ADD key_20230114.bin ./
# prepare permissions and aria2 dir
RUN chmod +x ./cloudreve  \
    && ls -l ./ \
    && mkdir -p /data/aria2  \
    && chmod -R 766 /data/aria2

EXPOSE 5212
VOLUME ["/cloudreve/uploads", "/cloudreve/avatar", "/data"]

ENTRYPOINT ["./cloudreve"]

Mr.Twan大约 19 分钟主机运维cloudreveProdocker-composedocker
迷你主机TrueNasWOL唤醒

Morefine 500+ AMD R9 5900HX Mini主机 安装TrueNas 开启WOL唤醒

家里本来有一个威联通 453d 可惜性能太弱了,放了点docker服务、挂个qb、几个个人编写的Java玩具 CPU使用率就没下过79%

1. 准备工作:

1.1. 机器首先需要至少两块硬盘(500+是够的,本身可以插两个m2,一个stata)

一个作为系统盘,一个作为数据盘,如果要做raid,不外接硬盘的情况下应该只能是raid0了。

Mr.Twan大约 3 分钟主机运维迷你主机wol
nacos 2.x 集群搭建后服务注册失败

报错:

server is DOWNnow, detailed error message: Optional[Distro protocol is not initialized]

关键日志:

com.alibaba.nacos.api.exception.NacosException: failed to req API:/nacos/v1/ns/instance/list after all servers([XXX:8848]) tried: ErrCode:503, ErrMsg:server is DOWNnow, detailed error message: Optional[Distro protocol is not initialized]
	at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:552)
	at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:491)

Mr.Twan大约 1 分钟编程笔记javanacosspring cloud alibaba
Java SMBJ库的基本使用

使用它是因为客户要求网盘中能操作共享文件夹,但因为服务器是一台windows server2012+ 貌似是不支持smb1协议,故而jcifs并不适用,目前Java实现的开源smb2/smb3库我找到的只有SMBJ

SMBJ

它GitHub是这样说的:SMB2/SMB3 client library for Java 项目github地址:SMBJ API文档地址:https://www.javadoc.io/doc/com.hierynomus/smbj


Mr.Twan大约 4 分钟编程笔记javasmbsmbj