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已经上市很多年,不是什么新鲜事物了,很多企业或者开发同学以前也不多不少有所接触,但是有实操经验的人不多,本系列教程主要偏重实战,尽量讲干货,会根据本人理解去做阐述,具体官方概念可以查阅官方 ...
随机推荐
- shell编程学习笔记--整数自增
在Shell脚本中,用于while或for循环中经常要涉及到整数自增的情况,下面罗列下可能的方式 [方式一]declare -i来声明整数变量 root@localhost:~# declare -i ...
- Spring_配置 Bean(2)
applicationContext.xml <?xml version="1.0" encoding="UTF-8"?><beans xml ...
- git代码提交与克隆
在工作中,越来越多的人会使用git来管理代码.下面简单的介绍一下git在工作中的使用流程 1.给你一个git地址,将代码拉下来基本操作流程如下: 1.1 git clone "项目地址&qu ...
- 调用webservices中 枚举类型没有被序列化问题
引用服务后,代理类为自动为所有枚举类型生成了一个Bool类型相关字段,命名方式:比如枚举类名为“PayType”,生成的相关字段为“PayTypeSpecified”,此字段有何作用? PayType ...
- cmd常用命令大全
cmd命令提示符:只是系统模拟的dos操作环境,且功能远远大于dos 1. 返回上一层 cd.. 2. 进入A文件夹 cd A 3. 进入A文件夹下的B文件夹 cd A/B 4. c盘下的A文 ...
- hibernate——第一次简单的使用
提前有jdk.mysql.hibernate必须jar包.mysql连接jar包 mysql中的表 Java中的bean,User类 package com.xiaostudy.demo; publi ...
- C++ Primer 第二章 学习笔记
在auto一个引用时,auto会忽略顶层const,而保存底层const decltype(sum()) x = i; // I的类型就是sum()返回值的类型
- 数字组合问题:Combination,CombinationSum,CombinationSum2,CombinationSum3
Combination问题描述:给定n和k,找出1-n之间所有k个数的组合,例如:n=3,k=2,返回 [[1,2] [1,3] [2,3]] 算法分析:利用递归.递归边界就是curr.size( ...
- Codeforces Round #363 (Div. 2) A、B、C
A. Launch of Collider time limit per test 2 seconds memory limit per test 256 megabytes input standa ...
- ie if判断
<p> </p> <!--[if lt IE 7]> <html lang="en" ng-app="myApp" c ...