-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: silverback build missing files during generate #151
Conversation
db9fb0a
to
76aae36
Compare
btw is there a way to tee the output of the build command so we see it in the output while it's building? |
That subprocess is supposed to do so with the stdout. I'll dig into this |
dc84413
to
ea15206
Compare
@fubuloubu let me know how you'd like these changes to look. We're now getting a proper output (I was overwriting the PIPE to stderr from stdout before). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks perfect!
$ silverback build --generate
Generated ./.silverback-images/Dockerfile.paymaster
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile.paymaster
#1 transferring dockerfile: 445B done
#1 DONE 0.0s
#2 [internal] load metadata for ghcr.io/apeworx/silverback:stable
#2 DONE 0.0s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/8] FROM ghcr.io/apeworx/silverback:stable
#4 DONE 0.0s
#5 [internal] load build context
#5 transferring context: 589B done
#5 DONE 0.0s
#6 [6/8] COPY ape-config.yaml .
#6 CACHED
#7 [5/8] RUN pip install --upgrade pip && pip install -r requirements.txt
#7 CACHED
#8 [4/8] COPY requirements.txt .
#8 CACHED
#9 [2/8] WORKDIR /app
#9 CACHED
#10 [3/8] RUN chown harambe:harambe /app
#10 CACHED
#11 [7/8] RUN ape plugins install -U .
#11 CACHED
#12 [8/8] COPY bots/paymaster.py /app/bot.py
#12 CACHED
#13 exporting to image
#13 exporting layers done
#13 writing image sha256:a8ac40894696c0fbf0c425525d749d2504ae6d3201e5359afd1275bbf0a2188c done
#13 naming to docker.io/library/paymaster:latest done
#13 DONE 0.0s
Actually @johnson2427, there is a utility function in ape that will hide your home directory path with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much cleaner, some small updates I want to make
What I did
Added a check for
requirements.txt
andape-config.yaml
sosilverback build
doesn't fail if those files don't existfixes: #150
How I did it
Removed the lines pertaining to the
requirements.txt
andape-config.yaml
files and move them into a conditional within the build command.How to verify it
Check your dockerfile output in .silverback-images
Check your dockerfile output in .silverback-images and the requirements.txt lines should no longer be there.
Checklist