install nexus 3 on docker.

Install Nexus3

pull image from Dockerhub

docker pull sonatype/nexus3:latest

create volumn on local disk

mkdir -p /home/finuks/Data/trilium-data &&
	chmod -R 777 /home/finuks/Data/trilium-data

create container

1
2
3
4
5
6
docker run -d --restart=always \
	--name nexus3 \
	--ip 172.17.0.2 \
	-p 8081:8081 \
	-v /home/finuks/Data/nexus-data:/nexus-data \
	sonatype/nexus3:3.49.0

It takes a long time for the first initialization, about 2 minutes.

APT Repository

create new blob

Repository -> Blob Stores -> Type: File -> Name: apt

create apt repo

Repository -> Repositories -> Create repository -> apt(proxy)

replace sources.list

sed -i 's#https://mirrors.ustc.edu.cn/ubuntu/#http://192.168.52.15:11381/repository/apt-jammy-proxy/#g' \
  /etc/apt/sources.list

Pypi Repository

create pypi repo

Repository -> Repositories -> Create repository -> pypi(proxy)

replace pip.conf

linux path: ~/.pip/pip.conf

windows path: ~/AppData/Roaming/pip/pip.conf

[global]
timeout = 6000
index-url = http://192.168.52.15:11381/repository/pypi-proxy/simple
trusted-host = 192.168.52.15

Conda Repositoy

create pypi repo

Repository -> Repositories -> Create repository -> conda(proxy)

replace channels

# show channels
conda config --show channels
# add channels
conda config --add channels http://192.168.1.113:8081/repository/conda-proxy/main
# remove all channels
conda config --remove-key channels
# remove specific channels
conda config --remove channels http://192.168.1.113:8081/repository/conda-proxy/main

# list all virtual environments
conda env list
# delete a specific virtual environment
conda env remove --name <environment_name>

# check the available Python versions
conda search "^python$"

conda清华源参考

~/.condarc

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
auto_activate_base: false
show_channel_urls: true

NPM Repositoy

create pypi repo

Repository -> Repositories -> Create repository -> npm(proxy)

replace registry

.npmrc

# get current registry
npm config get registry

# set registry
npm config set registry http://192.168.52.15:11381/repository/npm-proxy/

.yarnrc

yarn config set registry https://registry.npmmirror.com