dockerfile Dockerfile有常见的缺失工具

Dockerfile有常见的缺失工具

Dockerfile
FROM ubuntu:18.04
LABEL maintainer="Carles San Agustin"

RUN apt-get update && \
    apt-get -y install vim net-tools procps telnet

RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

dockerfile Dockerfile

Dockerfile
FROM continuumio/miniconda3

# Set the ENTRYPOINT to use bash
# (this is also where you’d set SHELL,
# if your version of docker supports this)
ENTRYPOINT [ “/bin/bash”, “-c” ]

EXPOSE 5000

# Conda supports delegating to pip to install dependencies
# that aren’t available in anaconda or need to be compiled
# for other reasons. In our case, we need psycopg compiled
# with SSL support. These commands install prereqs necessary
# to build psycopg.
RUN apt-get update && apt-get install -y \
 libpq-dev \
 build-essential \
&& rm -rf /var/lib/apt/lists/*

# Use the environment.yml to create the conda environment.
ADD environment.yml /tmp/environment.yml
WORKDIR /tmp
RUN [ “conda”, “env”, “create” ]

ADD . /code

# Use bash to source our new environment for setting up
# private dependencies—note that /bin/bash is called in
# exec mode directly
WORKDIR /code/shared
RUN [ “/bin/bash”, “-c”, “source activate your-environment && python setup.py develop” ]

WORKDIR /code
RUN [ “/bin/bash”, “-c”, “source activate your-environment && python setup.py develop” ]

# We set ENTRYPOINT, so while we still use exec mode, we don’t
# explicitly call /bin/bash
CMD [ “source activate your-environment && exec python application.py” ]

dockerfile 康达码头工人

Dockerfile
FROM continuumio/miniconda3

# Set the ENTRYPOINT to use bash
# (this is also where you’d set SHELL,
# if your version of docker supports this)
ENTRYPOINT [ “/bin/bash”, “-c” ]

EXPOSE 5000

# Conda supports delegating to pip to install dependencies
# that aren’t available in anaconda or need to be compiled
# for other reasons. In our case, we need psycopg compiled
# with SSL support. These commands install prereqs necessary
# to build psycopg.
RUN apt-get update && apt-get install -y \
 libpq-dev \
 build-essential \
&& rm -rf /var/lib/apt/lists/*

# Use the environment.yml to create the conda environment.
ADD environment.yml /tmp/environment.yml
WORKDIR /tmp
RUN [ “conda”, “env”, “create” ]

ADD . /code

# Use bash to source our new environment for setting up
# private dependencies—note that /bin/bash is called in
# exec mode directly
WORKDIR /code/shared
RUN [ “/bin/bash”, “-c”, “source activate your-environment && python setup.py develop” ]

WORKDIR /code
RUN [ “/bin/bash”, “-c”, “source activate your-environment && python setup.py develop” ]

# We set ENTRYPOINT, so while we still use exec mode, we don’t
# explicitly call /bin/bash
CMD [ “source activate your-environment && exec python application.py” ]

dockerfile Mongo 3.6 docker文件示例

Mongo 3.6 docker文件示例

Dockerfile
FROM ubuntu

RUN apt-get update
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
RUN echo 'deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/testing multiverse' | tee /etc/apt/sources.list.d/mongodb-org-3.6.list
RUN apt-get update
RUN apt-get install -y mongodb-org

RUN mkdir -p /data/db

EXPOSE 27017
ENTRYPOINT ["/usr/bin/mongod", "--bind_ip_all"]

# to run  
# docker build -t mongo-example .
# docker run --name mongo-example -p 27017:27017 -t mongo-example 

dockerfile 烧瓶应用程序的Dockerfile

把它放在烧瓶应用程序的根目录中,以便将它停靠

Dockerfile
FROM tiangolo/uwsgi-nginx-flask:python3.6

COPY . /app

RUN pip install -r requirements.txt

dockerfile 在Docker容器中的Ansible

在Docker容器中的Ansible

Dockerfile
FROM ubuntu:18.04
MAINTAINER Carles San Agustin

RUN apt-get update && \
    apt-get -y install python-pip python-dev build-essential software-properties-common && \
    apt-get -y install ansible && \
    pip install pywinrm && \
    pip install apache-libcloud

WORKDIR /shared

# CREATE: docker build -t "ansible" .
# RUN command: docker run -v $(pwd):/shared ansible ansible-playbook playbook.yml
# RUN interactive : docker run -it -v $(pwd):/shared ansible bash

dockerfile 节点:libav

节点:libav

Dockerfile
FROM node
RUN apt-get -y update && apt-get -y install libav-tools

dockerfile Dockerfile

Dockerfile
FROM node:carbon
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 8080
CMD ["npm", "start"]

dockerfile Dockerfile

Dockerfile
FROM ubuntu:latest

RUN apt-get update
RUN apt-get install -y python python-pip wget
RUN pip install Flask

ADD hello.py /home/hello.py

WORKDIR /home

dockerfile 用于Python Hug Based Applications的Dockerfile使用gunicorn提供服务

用于Python Hug Based Applications的Dockerfile使用gunicorn提供服务

Dockerfile
FROM python:3.6-slim
LABEL maintainer="Aayush Sarva" email="aayush@socialcops.com"

WORKDIR /usr/src/app

COPY ./requirements.txt /usr/src/app
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app
EXPOSE 5000
CMD gunicorn -b :5000 --timeout 300 <path_to_hug_api>:__hug_wsgi__