Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker build have some problem #7

Open
1 of 4 tasks
nilabjasarkar123 opened this issue Feb 23, 2023 · 0 comments
Open
1 of 4 tasks

docker build have some problem #7

nilabjasarkar123 opened this issue Feb 23, 2023 · 0 comments

Comments

@nilabjasarkar123
Copy link

nilabjasarkar123 commented Feb 23, 2023

Description

docker build -t simple-kubernetes-webhook:latest .
Describe your issue here.
docker build -t simple-kubernetes-webhook:latest .
Sending build context to Docker daemon 302.6kB
Step 1/10 : FROM golang:1.16 AS build
---> 972d8c0bc0fc
Step 2/10 : ENV GOOS=linux
---> Using cache
---> 2e47c29d7211
Step 3/10 : ENV GOARCH=amd64
---> Using cache
---> 9267f812ca01
Step 4/10 : ENV CGO_ENABLED=0
---> Using cache
---> 09544e250c9d
Step 5/10 : WORKDIR /work
---> Using cache
---> c14db25f964e
Step 6/10 : COPY . /work
---> Using cache
---> db4e6d6d38e0
Step 7/10 : RUN --mount=type=cache,target=/root/.cache/go-build,sharing=private go build -o bin/admission-webhook .
the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled

What type of issue is this? (place an x in one of the [ ])

  • [x ] bug
  • enhancement (feature request)
  • question
  • [ x] documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • [ x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x ] I've read and agree to the Code of Conduct.
  • [x ] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.
this command can solve the bug

Reproducible in:

simple-kubernetes-webhook version:

Go version:

OS version(s): Ubuntu 20

Steps to reproduce:

  1. DOCKER_BUILDKIT=1 docker build -t simple-kubernetes-webhook:latest .

Expected result:

image should be built successfully
What you expected to happen
image not able to build

Actual result:

DOCKER_BUILDKIT=1 docker build -t simple-kubernetes-webhook:latest .
with the above command the image is about to build successfully
What actually happened

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.
DOCKER_BUILDKIT=1 docker build -t simple-kubernetes-webhook:latest .
[+] Building 2.2s (12/12) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> resolve image config for docker.io/docker/dockerfile:experimental 1.8s
=> CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5 0.0s
=> [internal] load metadata for docker.io/library/golang:1.16 0.0s
=> [build 1/4] FROM docker.io/library/golang:1.16 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 10.53kB 0.0s
=> CACHED [build 2/4] WORKDIR /work 0.0s
=> CACHED [build 3/4] COPY . /work 0.0s
=> CACHED [build 4/4] RUN --mount=type=cache,target=/root/.cache/go-build,sharing=private go build -o bin/admission-webhook . 0.0s
=> CACHED [run 1/1] COPY --from=build /work/bin/admission-webhook /usr/local/bin/ 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:05f5f2f299a6e333a6122cb43701a7f16968359129fc5adce330f72d0fa53c93 0.0s
=> => naming to docker.io/library/simple-kubernetes-webhook:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant