fn project 私有镜像发布
fnproject 默认的docker registry 是 dockerhub 对于企业应用还是不太方便的
还好系统系统了配置参数方便我们进行配置,与开源harbor 进行集成
此处略过,安装比较简单,参考github 文档即可
1. 构建
func.yml
参考配置
NAME:
fn init - create a local func.yaml file
USAGE:
fn init [command options] [FUNCTION_NAME]
DESCRIPTION:
Creates a func.yaml file in the current directory.
OPTIONS:
--name value name of the function. Defaults to directory name.
--force overwrite existing func.yaml
--runtime value choose an existing runtime - .py, .rs, .java, .go, .js, .cs, .fs, .rb, .php
--entrypoint value entrypoint is the command to run to start this function - equivalent to Dockerfile ENTRYPOINT.
--cmd value command to run to start this function - equivalent to Dockerfile CMD.
--version value set initial function version (default: "0.0.1")
--image value, -i value image name
--memory value, -m value memory in MiB (default: 128)
--type value, -t value route type - sync or async
--config value, -c value route configuration
--headers value route response headers
--format value, -f value hot container IO format - default or http (default: "default")
--timeout value route timeout (eg. 30) (default: 30)
--idle-timeout value route idle timeout (eg. 30) (default: 30)
2. deploy
使用 --registry 即可
参考配置
NAME:
fn deploy - deploys a function to the functions server. (bumps, build, pushes and updates route)
USAGE:
fn deploy [command options] [arguments...]
OPTIONS:
--app value app name to deploy to
--verbose, -v verbose mode
--no-cache Don't use Docker cache for the build
--local, --skip-push does not push Docker built images onto Docker Hub - useful for local development.
--registry --registry username Sets the Docker owner for images and optionally the registry. This will be prefixed to your function name for pushing to Docker registries. eg: --registry username will set your Docker Hub owner. `--registry registry.hub.docker.com/username` will set the registry and owner.
--all app.yaml if in root directory containing app.yaml, this will deploy all functions
1. 需要进行 registry 的登录
登录命令为:
docker login registry
2.配置环境变量
FN_REGISTRY
如下:
export FN_REGISTRY=<DOCKERHUB_USERNAME>
https://github.com/fnproject/fn
fn project 私有镜像发布的更多相关文章
- netcore 创建腾讯云私有镜像 发布到docker 实战
上一篇博客写的 netcoer上传到docker ,编译 并发布,传送门:FineUICore基础版部署到docker实战 这是一种笨方法,理想的方法是,在本地编译成镜像,然后推送到镜像仓库,服务器的 ...
- Docker将自己的镜像发布到个人私有仓库
Docker将自己的镜像发布到个人私有仓库 1.注册dockerhub账户 docker提供了一个类似于github的仓库dockerhub, 网址https://hub.docker.com/需要注 ...
- docker部署harbor私有镜像库(3)
一.harbor介绍 在实际生产运维中,往往需要把镜像发布到几十.上百台或更多的节点上.这时单台Docker主机上镜像已无法满足,项目越来越多,镜像就越来越多,都放到一台Docker主机上是不行的,我 ...
- 将 ASP.NET Core 1.0 应用作为 docker 镜像发布 (Linux版)
var appInsights=window.appInsights||function(config){ function r(config){t[config]=function(){var i= ...
- 使用Nexus3构建Docker私有镜像仓库
一.安装Nexus3 Nexus3是Sonatype提供的仓库管理平台,Nuexus Repository OSS3能够支持Maven.npm.Docker.YUM.Helm等格式数据的存储和发布:并 ...
- 搭建Harbor私有镜像仓库--v1.5.1
搭建Harbor私有镜像仓库--v1.5.1 1.介绍 Docker容器应用的开发和运行离不开可靠的镜像管理,虽然Docker官方也提供了公共的镜像仓库,但是从安全和效率等方面考虑,部署我们私有环境 ...
- .Net Core自动化部署系列(二):使用Jenkins打造镜像发布流水线
一.简介 之前写过一篇关于Jenkins搭配GitLab实现.net core项目自动发布到IIS的博文,比较简单哈,只是个Demo.本篇我们将会使用Jenkins搭配GitLab实现镜像的自动打包和 ...
- 程序员修神之路--打通Docker镜像发布容器运行流程
菜菜哥,我看了一下docker相关的内容,但是还是有点迷糊 还有哪不明白呢? 如果我想用docker实现所谓的云原生,我的项目该怎么发布呢? 这还是要详细介绍一下docker了 Docker 是一个开 ...
- Docker深入浅出系列 | 5分钟搭建你的私有镜像仓库
Docker已经上市很多年,不是什么新鲜事物了,很多企业或者开发同学以前也不多不少有所接触,但是有实操经验的人不多,本系列教程主要偏重实战,尽量讲干货,会根据本人理解去做阐述,具体官方概念可以查阅官方 ...
随机推荐
- 使用net.sf.json包提供的JSONObject.toBean方法时,日期转化错误解决办法
解决办法: 需要在toBean之前添加配置 String[] dateFormats = new String[] {"yyyy-MM-dd HH:mm:ss"}; JSONUti ...
- Angularjs注入拦截器实现Loading效果
angularjs作为一个全ajax的框架,对于请求,如果页面上不做任何操作的话,在结果烦回来之前,页面是没有任何响应的,不像普通的HTTP请求,会有进度条之类. 什么是拦截器? $httpProvi ...
- JavaScript 知识记录
1.单引号和双引号 $a = 1; echo $a; // 1 echo "$a"; // 1 echo '$a'; // $a 双引号会搜索引号内的内容是不是有变量,有则输出其值 ...
- Eclipse工具栏上android的机器人小图标不见了
可以通过「Window」⇒「Customize Perspective」⇒「Tool Bar Visibility」Tab画面上选择Android SDK and AVD Manager来显示
- CodeForces 385 D.Bear and Floodlight 状压DP
枚举灯的所有可能状态(亮或者不亮)(1<<20)最多可能的情况有1048576种 dp[i]表示 i 状态时灯所能照射到的最远距离(i 的二进制中如果第j位为0,则表示第j个灯不亮,否则就 ...
- RedHat Linux服务器安全配置细节
1.概述 Linux服务器版本:RedHat Linux AS 2.1 对于开放式的操作系统---Linux,系统的安全设定包括系统服务最小化.限制远程存取.隐藏重要资料.修补安全漏洞.采用安全工具以 ...
- 【Wannafly挑战赛10 - B】小H和密码(DP)
试题链接:https://www.nowcoder.com/acm/contest/72/B 题目描述 小H在击败怪兽后,被一个密码锁挡住了去路 密码锁由N个转盘组成,编号为1~N,每 ...
- 蓝牙(cc2540) 协议栈 学习一
---------------------------------------------------------- app ------------------------------------- ...
- Node.js 问题集合
使用node合并多个接口, 最后获取数据慢的问题 暂时没解决方法 pm2 访问 ip 记录到日志 ...
- Android中从SD卡中读取歌曲
先看看我的效果图吧 Activity类 private TextView nameTextView; private SeekBar seekBar; private ListView listVie ...