#Mongo Dockerfile
FROM alpine:edge
MAINTAINER "loko" <[email protected]>
# proxy settings
ARG http_proxy=http://your-corporate-proxy-if-is-need-it/
ARG https_proxy=http://your-corporate-proxy-if-is-need-it/
ARG no_proxy=localhost,127.0.0.0/8,::1,15.0.0.0/8,16.0.0.0/8
ADD run/
ADD dosu /sbin/
RUN chmod +x /sbin/dosu && \
echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk add --no-cache mongodb
VOLUME /data/db
EXPOSE 27017 28017
ENTRYPOINT [ "/run" ]
CMD [ "mongod" ]
# Docker Oluştur
version: '2.0'
volumes:
data:
external:
name: "the-volume-name-you-want
services:
web:
build:
context: .
dockerfile: "Dockerfile"
args:
- HTTP_PROXY
- HTTPS_PROXY
- http_proxy
- https_proxy
- no_proxy
- NO_PROXY
image: "docker-hub-OR-your-built-image-name"
environment:
- http_proxy=$http_proxy
- https_proxy=$https_proxy
- no_proxy=$no_proxy
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
ports:
- "8080"
restart: always
depends_on:
- mongo
mongo:
image: "your-favorite-mongodb-image-name"
environment:
- http_proxy=$http_proxy
- https_proxy=$https_proxy
- no_proxy=$no_proxy
- HTTP_PROXY=$HTTP_PROXY
- HTTPS_PROXY=$HTTPS_PROXY
- NO_PROXY=$NO_PROXY
restart: always
volumes:
- data:/data/db
inşa için deneyin ve
docker-compose build .
docker-compose up
Ne sürümünü çalıştırın? Görünüşe göre 2 görünüyor. Sürüm 3'te bilgi arıyorum. – Dagrooms
@Dagrooms: Bunu buldunuz mu? Ben denedim ama veri –