首页 > 其他分享 >Dockerfile example

Dockerfile example

时间:2023-07-26 21:36:14浏览次数:29  
标签:install get simple apt https Dockerfile example rocketmq

FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
# RUN rm /etc/apt/sources.list.d/cuda.list
RUN apt-get update
# 安装ifconfig命令
RUN apt-get install -y net-tools
# 安装ping命令
RUN apt-get install -y iputils-ping
# opencv-python依赖
RUN apt-get install -y libgl1 ffmpeg
RUN apt-get install -y wget
RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip
RUN pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 安装yolov5s
RUN pip3 install yolov5==7.0.7
# 拷贝代码至docker
WORKDIR /root/
COPY envs ./envs
COPY code ./code
WORKDIR /root/envs
# 安装rocketmq-client-cpp
RUN wget https://ghproxy.com/https://github.com/apache/rocketmq-client-cpp/releases/download/2.0.0/rocketmq-client-cpp-2.0.0.amd64.deb
RUN dpkg -i rocketmq-client-cpp-2.0.0.amd64.deb
RUN pip3 install rocketmq-client-python==2.0.0
RUN pip3 install -r requirements.txt
WORKDIR /root/code
RUN wget https://ghproxy.com/https://github.com/aler9/rtsp-simple-server/releases/download/v0.21.4/rtsp-simple-server_v0.21.4_linux_amd64.tar.gz
RUN tar -xzvf rtsp-simple-server_v0.21.4_linux_amd64.tar.gz
ENV OPENCV_FFMPEG_CAPTURE_OPTIONS="rtsp_transport;udp"

ENTRYPOINT ["sh", "start.sh"]

标签:install,get,simple,apt,https,Dockerfile,example,rocketmq
From: https://www.cnblogs.com/RhettButler/p/17583571.html

相关文章

  • unable to prepare context: unable to evaluate symlinks in Dockerfile path: l
    Dockerfile路径中的符号链接无法解析的问题在使用Docker构建镜像时,有时会遇到错误消息“unabletopreparecontext:unabletoevaluatesymlinksinDockerfilepath:l”。这个错误通常是由于Dockerfile文件路径中包含了无法解析的符号链接所引起的。本文将介绍这个问题的原因......
  • 用Dockerfile实现构建带sshd服务的自定义镜像
    使用Dockerfile构建带sshd服务的自定义镜像教程简介Docker是一种轻量级的容器化平台,可以帮助我们更方便地构建、部署和运行应用程序。本教程将教你如何使用Dockerfile来构建一个带sshd服务的自定义镜像。整体流程下面是构建自定义镜像的整体流程,我们将通过表格的形式展示每个步......
  • 2.dockerfile指令及数据卷
    dockerfile指令总结FROM:指定基础镜像LABEL:指定镜像元数据,即标签RUN:指定shell命令CMD:容器启动命令EXPORT:暴露端口ENV:设置环境变量ADD:复制和解包文件,增强版的copyCOPY:复制本地宿主机的文本到容器VLOUME:匿名卷WORKDIR:指定工作目录ARG:构建参数USER:指定当前用户ENTRYPOINT:......
  • 4.镜像制作方式和dockerfile(Ubuntu、nginx)
    制作镜像方式dockercommit通过修改现有的容器,将之手动构建为镜像dockerbuild通过dockerfile文件,批量构建为镜像用镜像做成容器,在容器的基础上定制一个镜像手动制作镜像:commit基于busybox容器创建busybox:v1.0镜像[root@ubuntu2004~]#dockercommit-ali-m"initbusybo......
  • dockerfile endpoint使用环境变量
    DockerfileEndpoint使用环境变量介绍在Docker开发环境中,使用环境变量是一种常见的做法。环境变量可以提供一种灵活且可配置的方式,用于在不同的容器之间传递参数。而Dockerfile中的Endpoint用于指定容器的入口点,即容器启动后要执行的命令或脚本。本文将介绍如何在Dockerfile中使......
  • mysql arm dockerfile
    MySQLonARMwithDockerfileIntroductionWiththeincreasingpopularityofARM-baseddevices,itisbecomingmorecommontorunapplicationsandservicesonARMarchitecture.OnesuchapplicationisMySQL,apowerfulandwidelyusedrelationaldatabasem......
  • 使用 Dockerfile 构建生产环境镜像
    传统部署的坑:1202年了,如果你连Docker都不知道是什么,我建议买一本书看看——或者谷歌一下,博客已经写烂了。为什么有这篇文章,是因为我在真正做容器化改造的时候,发现公司生产环境存在大量的坑:传统虚拟机部署,基本依赖克隆或者手工编译。由于人力原因,SRE历来单传,编译出来的PHP......
  • 【问题解决】docker版本v23.0后,构建Dockerfile中FROM私库镜像报错构建失败
    问题情况Docker版本在v23.0以后,只要Dockerfile中FROM的私库镜像不存在本地,就会报错:#我本地是v24.0.2版本Docker[root@localhostipd]#dockerbuild.-tharbor.xxx.com.cn/test/bap:2.7.1[+]Building0.6s(3/3)FINISHED......
  • MIT6.s081/6.828 lectrue1:Introduction and examples
    目前课程官网能够查到2020,2021.2022秋季的课程表,但是视频都是2020年录制的那一版简单复习+回顾下自己的OS学习之旅参考资料:官网:https://pdos.csail.mit.edu/6.828/2022/schedule.html视频翻译:https://mit-public-courses-cn-translatio.gitbook.io/mit6-s081/教材英文......
  • Docker 学习之路之 Dockerfile
    Docker镜像原理Docker镜像是由特殊的文件系统叠加而成的,其本质是一个分层的文件系统镜像制作由容器转为镜像dockercommit容器ID镜像名称:版本号#将镜像保存成压缩文件dockersave-o压缩文件名称镜像名称:版本号#将压缩的镜像加载成镜像dockerload-i压缩......