Giter Site home page Giter Site logo

Comments (1)

niuhuan avatar niuhuan commented on June 23, 2024

我简单说下docker运行一个应用程序,这并不属于proc_qq的问题,您尽量多使用搜索引擎。

  1. 编译,参考example, 首先你要用一个ubuntu系统将他编译,并运行 当然你可以用debian,选择docker镜像时要使用相同镜像避免依赖版本不一致。如果你用ubuntu20.04.4, 那么你用的docker镜像就是 ubuntu:20.04.

  2. 尝试运行一个二进制程序在docker,
    1). 运行一个docker docker run -d --name ubuntu -itd /bin/bash ubuntu:20.04 , 这样你就有了自己的docker镜像并且在运行
    2). 你可以把你的程序和配置文件里,比如叫 myqq 复制到docker里, docker cp myqq ubuntu:
    3). 运行你的文件,并尝试安装缺失的库 ./myqq 最尝需要安装的是 ca-certificates curl libssl-dev openssl

  3. 使用dockerfile制作装好依赖的ubuntu
    docker build -t ubuntu:certs .

    FROM ubuntu:20.04
    RUN apt-get -qq update \
      && apt-get -qq install -y --no-install-recommends ca-certificates curl  libssl-dev openssl
  4. 把自己的配置文件放在/opt/myqq下 完整路径为 /opt/myqq/myqq, 运行docker,如果您想第一次运行docker的时候可以使用命令行,请加上参数 -it 不要加 -d。您可以仔细查我这个命令行的意思. docker run --net host --name myqq --workdir=/app -v /opt/myqq -d ubuntu:certs ./myqq

  5. 您要知道 docker的一些参数 --restart -v -p -it 等,并且学会使用docker logs查看日志

from rust_proc_qq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.