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

Dockerfile: avoid usage errors #681

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

r00t-
Copy link
Contributor

@r00t- r00t- commented Nov 28, 2024

prevent issues like #619 and #680

@r00t- r00t- force-pushed the avoid_dockerfile_usage_errors branch from eb86532 to 042e118 Compare November 28, 2024 23:39
@r00t-
Copy link
Contributor Author

r00t- commented Nov 28, 2024

this, together with the comment in the Dockerfile, should hopefully avoid such confusion in the future.

[/vzlogger]$ docker build - <Dockerfile
Sending build context to Docker daemon  3.584kB
Step 1/18 : FROM alpine:latest as builder
 ---> 28f6e2705743
Step 2/18 : COPY . /vzlogger
 ---> 49fdd3c1cd71
Step 3/18 : COPY CMakeLists.txt /vzlogger/
COPY failed: file not found in build context or excluded by .dockerignore: stat CMakeLists.txt: file does not exist
[vzlogger]$ docker build .
(succeeds)

############################
# STEP 1 build executable binary
############################

FROM alpine:latest as builder

COPY . /vzlogger
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulling this up here breaks docker-cache caching of the package installations below :(

maybe just copy CMakeLists.txt to a dummy location, it changes rarely so the impact on the cache should be neglegible.
or accept to fail less early.

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

Successfully merging this pull request may close these issues.

1 participant