Compose: Docker-compose pull don't pull new image for Dockerfile

Created on 26 Jan 2017  路  2Comments  路  Source: docker/compose

Hi there,
first my version:
```docker version
Client:
Version: 1.13.0
API version: 1.25
Go version: go1.7.3
Git commit: 49bf474
Built: Wed Jan 18 16:20:26 2017
OS/Arch: darwin/amd64
Server:
Version: 1.13.0
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 49bf474
Built: Wed Jan 18 16:20:26 2017
OS/Arch: linux/amd64
Experimental: true


and Docker info:

``` docker info
Containers: 5
 Running: 5
 Paused: 0
 Stopped: 0
Images: 15
Server Version: 1.13.0
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 62
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 2f7393a47307a16f8cee44a37b262e8b81021e3e
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.4-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.787 GiB
Name: moby
ID: NCR5:6ECB:KOGR:5CW6:J2HB:HDNE:Z6SD:BN3R:7WTL:RXKE:XSFR:ZIZ6
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 58
 Goroutines: 59
 System Time: 2017-01-24T17:37:23.374169255Z
 EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

my docker-compose.yml:

version: '2'
volumes:
  db:
  db_templates:
  files:
  helpers:
  ssh-config:
services:
  mail:
    image: djfarrelly/maildev
    ports:
      - "127.0.0.1:1080:80"
  redis:
    image: redis
  db:
    image: postgres
    command: -c fsync=off
    volumes:
      - db:/var/lib/postgresql/data
  db_templates:
    image: postgres
    command: -c fsync=off
    volumes:
      - db_templates:/var/lib/postgresql/data
  web:
    build: .
    volumes:
      - ./:/home/user/${COMPOSE_PROJECT_NAME}/
      - files:/home/user/files/
      - db:/db
      - helpers:/home/user/.pycharm_helpers/
      - ssh-config:/etc/ssh/
    ports:
      - "127.0.0.1:8000:8000"
      - "127.0.0.1:8022:22"
    depends_on:
      - db
      - db_templates
      - redis
    command: bash -c "/home/user/${COMPOSE_PROJECT_NAME}/bin/helpers/run && sleep infinity"

and my dockerfile for the webcontainer:

FROM ubuntu:trusty
# install system packages
RUN apt-get update -qq -y && export DEBIAN_FRONTEND=noninteractive && apt-get install -qq -y \
    gettext git libffi-dev libpq-dev ntp openssh-server python python-pip python-dev sloccount vim\
    && pip install virtualenv virtualenvwrapper
......

if i now run docker-compose pull all images will updated if a new version is there.
But my Ubuntu from the Dockerfile is not updated. then i have to run by hand "docker pull ubuntu:trusty"

Is it possible on a "Docker-compose pull" to check also the dockerfiles with their images automatically?

kinquestion

Most helpful comment

docker-compose build --pull is what you're looking for, I believe.

All 2 comments

docker-compose build --pull is what you're looking for, I believe.

Hey @shin- thanks, but than i have to run "docker-compose pull", "docker-compose build --pull" and "docker-compose up -d --build" for my app env. the seccond --build is redundant i know.

I think maybe it could a good practices to learn the up command --pull ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidbarratt picture davidbarratt  路  3Comments

maltefiala picture maltefiala  路  3Comments

guycalledseven picture guycalledseven  路  3Comments

DhairyashilBhosale picture DhairyashilBhosale  路  3Comments

dazorni picture dazorni  路  3Comments