1
votes

I use docker-compose to build my images, but they seem untagged, even though they show a tag. What am I doing wrong?

Example postgresql

docker-compose.yml file

version: '2'

services:
  postgresql:
    build:
      context: ../../../builds/psql95EP_DJ
      dockerfile: Dockerfile
    image:
      tl_psql95ep_dj:2017.04.05

In my understanding :2017.04.05 is the tag. And when using docker images I see

REPOSITORY                            TAG                 IMAGE ID            CREATED             SIZE
tl_nginx1118_dj                       2017.01.12          e8b509d66e98        12 hours ago        191 MB
tl_psql955ep_dj                       2017.01.12          0e75847db871        15 hours ago        275 MB

but when I delete the image I get the messages

Untagged: tl_psql955ep_dj:2017.01.12
Deleted: sha256:0e75847db871147054a6b....and so on...long number

same example with the nginx above:

docker-compose.yml

version: '2'

services:
  nginx:
    build:
      context: ../../../builds/nx1118_DJ
      dockerfile: Dockerfile
    image:
      tl_nginx1118_dj:2017.01.12

Delete gives me

Untagged: tl_nginx1118_dj:2017.01.12

I think it should have a proper tag, the way I do it: https://docs.docker.com/compose/compose-file/#build

Thanks!

1
"Untagged: tl_psql955ep_dj:2017.01.12" is a log message from docker. It means that it removed the tag from the image (untagged it). The next log message states that the image was deleted. Everything seems to be working as supposed. - herm

1 Answers

1
votes

Seems that @herm is right and untagged is the right procedure.

strange, I remember having images that didn's state untagged.....but cannot reproduce it anymore even with an official image

docker run -it --rm ubuntu:14.04 /bin/bash

then check tag, showing 14.04 and when you do

docker rmi <id>

it also states untagged. Must have done something differently. Thanks