坐看云起时|

一枚码农

园龄:7年6个月粉丝:5关注:1

docker 简单使用

参考文档:
https://docker.easydoc.net/doc/81170005/cCewZWoN/lTKfePfP

测试项目目录
image

Dockerfile 文件

点击查看代码
# 建立python环境
FROM python:3.10
# 镜像作者
MAINTAINER Along
# 设置python环境变量
ENV PYTHONUNBUFFERED 1
# 设置pip源为国内源
COPY pip.conf /root/.pip/pip.conf
# 在容器内/var/www/html/下创建 mysite1文件夹
RUN mkdir -p /data/djg_demo
# 设置容器内工作目录
WORKDIR /data/djg_demo
# 将当前目录文件加入到容器工作目录中(. 表示当前宿主机目录)
ADD . /data/djg_demo
# 利用 pip 安装依赖
RUN pip install -r requirements.txt

docker-compose.yml 文件

点击查看代码
version: '3.1'

services:
    mysql:
        image: mysql
        container_name: mysql
        hostname: mysql
        restart: always
        command: --default-authentication-plugin=mysql_native_password --mysqlx=0
        ports:
            - 3306:3306
        environment:
            - MYSQL_HOST=localhost
            - MYSQL_PORT=3306
            - MYSQL_DATABASE=dev
            - MYSQL_USER=dev
            - MYSQL_PASSWORD=123456
            - MYSQL_ROOT_PASSWORD=123456

    web:
        build:
            context: .
            dockerfile: Dockerfile
        image: web
        container_name: web
        hostname: web
        restart: always
        command: python /data/djg_demo/manage.py runserver 0.0.0.0:8000
        ports:
            - "8000:8000"
        depends_on:
            - mysql

pip.conf 文件

点击查看代码
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com

本文作者:一枚码农

本文链接:https://www.cnblogs.com/yimeimanong/p/16156142.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   一枚码农  阅读(56)  评论(0编辑  收藏  举报
历史上的今天:
2020-04-17 51单片机定时器中断
 
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 Sold Out Hawk
  2. 2 光辉岁月 Beyond
Sold Out - Hawk
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.

作词 : Jon Steingard

作曲 : Jon Steingard

I ain't like no one you met before

I'm running for the front

When they're all running for the door

And I won't sit down won't back out

You can't ever shut me up

Cause I'm on a mission

And I won't quit now

In a world full of followers

I'll be a leader

In a world full of doubters

I'll be a believer

I'm stepping out without a hesitation

Because the battle's already been won

I'm sold out

I'm no longer living

Just for myself

Running after Jesus

With my whole heart

And now I'm ready to show

I am sold out

I'm sold out

With every single

Step that I take now

With every drop of blood

Left in my veins

I'm gonna be making it count

I am sold out

This ain't just some temporary phase

You can't face this kind of grace

And leave the way you came

This is permanent with intent

And there won't be no stopping it now

I'm on a mission and it's heaven sent

In a world full of followers

I'll be a leader

In a world full of doubters

I'll be a believer

I'm stepping out without a hesitation

Cause my soul is like a stadium

I'm sold out

I'm no longer living

Just for myself

Running after Jesus

With my whole heart

And now I'm ready to shout

I am sold out

I'm sold out

With every single

Step that I take now

With every drop of blood

Left in my veins

I'm gonna be making it count

I am sold out

No trials coming against me

Could put a dent in my passion

They're just an opportunity

To put my faith into action

In a world full of followers

I'll be a leader

In a world full of doubters

I'll be a believer

I'm stepping out without a hesitation

I ain't got nothing left to be afraid of

I'm sold out

I'm no longer living

Just for myself

Running after Jesus

With my whole heart

And now I'm ready to show

I am sold out

I'm sold out

With every single

Step that I take now

With every drop of blood

Left in my veins

I'm gonna be making it count

I am sold out