Bootstrap:docker
From: ubuntu:18.04
%help
Redis 5.0.0 for Ubuntu
%post
apt-get update
apt-get install -y wget build-essential
wget http://download.redis.io/releases/redis-5.0.0.tar.gz
tar xzf redis-5.0.0.tar.gz
cd redis-5.0.0
make
%startscript
/redis-5.0.0/src/redis-server
%runscript
/redis-5.0.0/src/redis-cli
注意:制作镜像需要root权限
sudo singularity build redis.sif redis.def
启动redis server会调用%startscript
来启动redis server
运行redis client 会调用%runscript来运行redisclient
[root@host6 ~]# singularity run redis.sif
not connected>
[root@host6 ~]# ./redis.sif
not connected>
参考文档:
https://kongxx.blog.csdn.net/article/details/100550919