Cloud Native应用交付

  • 首页
  • 关于本站
  • 个人介绍
  • Downloads
  • Repo
    • Github
    • Container
  • F5
    • F5 Python SDK
    • F5-container
    • F5-LBaaS
  • 社交
    • 联系我
    • 微信/微博
    • 公众号
    • 打赏赞助
行至水穷处 坐看云起时
Cloud Native Application Services: cnadn.net
  1. 首页
  2. NGINX
  3. 正文

How to build nginx plus docker image with controller agent as well

2019年08月24日 3920点热度 0人点赞 0条评论

How to build a sidecar nginx plus docker image

Jing Lin@2019.08.23

  • Prepare the Dockerfile and the relevant SSL cert/key
1
2
3
4
5
6
7
8
9
10
-rw-r--r--. 1 root root   33 Aug 23 20:08 controller-api-key.txt
-rw-r--r--. 1 root root 2067 Aug 23 22:17 default.conf
-rw-r--r--. 1 root root   38 Aug 23 19:51 demo-index.html
-rw-r--r--. 1 root root 2939 Aug 23 22:16 Dockerfile
-rw-r--r--. 1 root root 1224 Aug 23 18:58 nginx-repo.crt
-rw-r--r--. 1 root root 1704 Aug 23 18:58 nginx-repo.key
-rw-r--r--. 1 root root 1152 Aug 23 22:20 server.crt
-rw-r--r--. 1 root root 1705 Aug 23 22:21 server.key
 
 
  • The dockerfile like, this file include install controller agent as well.
  • The default nginx configurations in conf.d, enable ssl and http2. Also enable nginx plus self API and dashboard.
  • Build the image. Note: Make sure the host can resolve the CTRL_HOST FQDN. Add it into hosts file or using DNS server to resolve it. The below API_KEY and CTRL_HOST is just sample, pls change to real key
1
2
3
4
5
docker build --no-cache --build-arg \
API_KEY=eb05ff073455e4bdc5f758290f385988 \
--build-arg CTRL_HOST=ng-ctlr.lab.f5se.io \
-t myf5/nginx-plus-sidecar:slim .
 
  • Run docker images to verify the image.
1
2
3
4
5
6
[root@plus1 nginx-plus-image-build]# docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
myf5/nginx-plus-sidecar   slim                614e06f91830        9 minutes ago       185MB
debian                    stretch-slim        220611111e8c        9 days ago          55.3MB
 
 
  • If you want to use the image on other host, then save and load it
1
2
3
docker save -o nginx-plus-sidecar-img.tar myf5/nginx-plus-sidecar:slim
docker load -i nginx-plus-sidecar-img.tar
 
  • If you want to push the image to a repo, pls only push to the private repo. Push to public repo is FORBIDDEN.

相关文章

  • 欢迎参加F5 NGINX Sprint China 2022
  • 企业开源分析和思考
  • 新书上线《NGINX经典教程》,基于NGINX的新技术新场景。感谢支持
  • Helm 3 部署NGINX Ingress Controller
  • NGINX与oAuth2/OIDC系列二
本作品采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可
标签: nginx nginx plus image sidecar
最后更新:2019年08月24日

纳米

linjing.io

打赏 点赞
< 上一篇
下一篇 >

文章评论

取消回复

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据。

  • How to build a sidecar nginx plus docker image

纳米

linjing.io

☁️迈向Cloud Native ADC ☁️

认证获得:
TOGAF: ID 152743
Kubernetes: CKA #664
Microsoft: MCSE MCDBA
Cisco: CCNP
Juniper: JNCIS
F5:
F5 Certified Solution Expert, Security
F5 Certified Technology Specialist, LTM/GTM/APM/ASM
F5 Certified BIG-IP Administrator
  • 点击查看本博技术要素列表
  • 归档
    分类
    • Automation
    • Avi Networks
    • Cisco ACI
    • CISCO资源
    • F5 with ELK
    • F5-Tech tips
    • F5技术
    • Juniper
    • Linux
    • NGINX
    • SDN
    • ServiceMesh
    • WEB编程
    • WINDOWS相关
    • 业界文章
    • 交换机技术
    • 化云为雨/Openstack
    • 协议原理
    • 容器/k8s
    • 我的工作
    • 我的生活
    • 网站技术
    • 路由器技术
    • 项目案例
    标签聚合
    network docker DNS neutron nginx F5 irule istio flannel envoy gtm openstack k8s bigip api
    最近评论
    TomCruz 发布于 6 个月前(10月12日) 2022-18:30:24 请提供下密码,谢谢您
    lili 发布于 6 个月前(09月26日) 11:53分 请查收
    lili 发布于 6 个月前(09月26日) 打赏
    厚嘴唇 发布于 1 年前(02月08日) ces部署之前要提前安装kube-ovn吧?
    厚嘴唇 发布于 1 年前(02月08日) ces部署必须是在kube-ovn网络安装好之后才可以吗
    浏览次数
    • Downloads - 81,301 views
    • Github - 80,761 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 73,865 views
    • 联系我 - 71,741 views
    • F5常见log日志解释 - 61,258 views
    • Sniffer Pro 4 70 530抓包软件 中文版+视频教程 - 51,137 views
    • 这篇文档您是否感兴趣 - 43,986 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 38,071 views
    • F5利用Elastic stack(ELK)进行应用数据挖掘系列(2)-DNS - 31,112 views
    • F5利用Elastic stack(ELK)进行应用数据挖掘系列(1)-HTTP - 30,301 views
    链接表
    • Jimmy Song‘s Blog
    • SDNap
    • SDNlab
    • SDN论坛
    • Service Mesh社区
    • 三斗室
    • 个人profile

    COPYRIGHT © 2022 Cloud Native应用交付. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang

    京ICP备14048088号-1

    京公网安备 11010502041506号