MAINTAINER is deprecated in Dockerfile. COPY is preferred over ADD in… #20
Labels
No labels
Accepted
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
Epic
good first issue
hacktoberfest
help wanted
icebox
In Review
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-docker#20
Loading…
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
… Dockerfile if additional functonality of ADD is not being used. Improved Shebang lines in many files.
Thanks for checking out LBRY and the contribution! If you haven't already, please make sure to check out our contributing guide.
Can we send you LBC in appreciation for your work?
Hi @alyssaoc! I appreciate that you find my contribution helpful and want to send me LBC for the same, but those LBC might be wasted on me because I don't use it.
@shubhambhattar the shebangs in an environment as specific as a container like this where nothing is going to change could go either way, I'm fine with this methodology. Is there a bigger explanation behind them as they are? I'm curious about your take on why you'd prefer this method.
Also thanks for reminding me that its COPY that I should be using and having brushed up on the Differences I'd realised that I could do away with wget/curl in a lot of images now.
The spee.ch container is a great catch too! I haven't touched that since I started working on this repo and started reworking my online portfolio. Are you in the Slack/Discord? Feel free to contact me if you're interested in contributing to this more.
I'm reconsidering even really adding a personal MAINTAINER label when this goes 1.0 anyways its an artifact of me developing this stack on my personal repo for the first while.
Thanks for reminding me to look into the difference between ADD / COPY there's a lot to keep track of when containerizing an entire app stack.
Not sure if there's a huge benefit for the shebangs but if its good form I'm definitely interested in some added perspective.
@Leopere The reason for shebangs is because I have made it a habit of using
env
to find and invoke the correct interpretor (bash
). You are right that in a container where you know exactly the location ofbash
, this is not necessary. I thought maybe if you someday change the base image in Dockerfile to something that doesn't storebash
in/bin/bash
, this might be helpful.Regarding changing a lot of
wget/curl
commands toADD
in Dockerfile: I thought of doing it too, but all I found was I can useADD
to specify the source of url and destination folder where the file needs to be stored. The problem is there are a lot of commands thatdownload a zip file -> unzip it -> removing the original zip file
in these Dockerfiles butADD
doesn't extractzip
files. So, I didn't see much advantage getting rid of thewget/curl
command and usingADD
in their place.Thanks for the response @shubhambhattar well I certainly appreciate the contribution. I ended up switching out a few
wget/curl's
but then I also just added another build step. This does make the docker-compose version minimum be at version 3.4 but I think this is acceptable. I may end up switching out to a different container base but it's likely to be Alpine if anything as I'd like to keep things close to minimalist standards.