docker / app

Make your Docker Compose applications reusable, and share them on Docker Hub
Apache License 2.0
1.57k stars 177 forks source link

Fix reference for service images we know by tag #716

Closed ndeloof closed 4 years ago

ndeloof commented 4 years ago

- What I did Freeze service images at build step https://docker.atlassian.net/browse/APP-294

- How I did it For all service image we don't build, resolve addressable-digest from registry

- How to verify it docker app build do generate a bundle.json with only digested references

- Description for the changelog Service images are resolved into digested reference during build

- A picture of a cute animal (not mandatory but encouraged) image

rumpl commented 4 years ago

What’s Java?

Sent from mobile - please excuse tone and brevity

On Oct 25, 2019, at 17:30, Nicolas De loof notifications@github.com wrote:

 @ndeloof commented on this pull request.

In internal/commands/build/build.go:

return bundle, nil

}

+func fixServiceImageReferences(ctx context.Context, dockerCli command.Cli, bundle *bundle.Bundle, pulledImages []ServiceConfig) error {

  • insecureRegistries, err := internal.InsecureRegistriesFromEngine(dockerCli)
  • if err != nil {
  • return fmt.Errorf("could not retrieve insecure registries: %v", err) Did I missunderstand golang does some magic with this legacy construct to dump previous error in the new one with Errorf so all legacy code doesn't have to be rewritten with Wrapf ? (which reminds me introduction of Exception.cause in Java 1.1 :P)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

codecov[bot] commented 4 years ago

Codecov Report

Merging #716 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #716   +/-   ##
======================================
  Coverage    72.9%   72.9%           
======================================
  Files          59      59           
  Lines        3351    3351           
======================================
  Hits         2443    2443           
  Misses        594     594           
  Partials      314     314

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0631b74...4aac7f0. Read the comment docs.

eunomie commented 4 years ago

@ndeloof I tried with my version of dockercoins and I have the following result:

could not resolve image docker.io/library/redis: object required

docker-compose.yml:

version: "3.6"

services:
  rng:
    image: dockercoins_rng
    build: rng
    ports:
    - "8001:80"

  hasher:
    image: dockercoins_hasher
    build: hasher
    ports:
    - "8002:80"

  webui:
    image: dockercoins_webui
    build: webui
    ports:
    - "8000:80"
    volumes:
    - "/Users/yvesbrissaud/src/github.com/eunomie/dockercoins/webui/files/:/files/"
    environment:
    - REDIS=redis

  redis:
    image: redis

  worker:
    image: dockercoins_worker
    build: worker
    environment:
    - REDIS=redis
    - HASHER=hasher
    - RNG=rng