Closed
Conversation
shedokan
reviewed
Sep 6, 2025
Comment on lines
+16
to
+26
| RUN groupadd -g 1000 app \ | ||
| && useradd -d /app -s /bin/bash -g app app \ | ||
| && chown -R app:app /app | ||
|
|
||
| RUN git clone https://github.com/awilliam/rom-parser && \ | ||
| cd rom-parser && \ | ||
| make && \ | ||
| chmod +x rom-parser && \ | ||
| mv rom-parser /usr/local/bin | ||
|
|
||
| WORKDIR /app |
There was a problem hiding this comment.
Chown of /app before creation causes an error 0.102 chown: cannot access '/app': No such file or directory
Suggested change
| RUN groupadd -g 1000 app \ | |
| && useradd -d /app -s /bin/bash -g app app \ | |
| && chown -R app:app /app | |
| RUN git clone https://github.com/awilliam/rom-parser && \ | |
| cd rom-parser && \ | |
| make && \ | |
| chmod +x rom-parser && \ | |
| mv rom-parser /usr/local/bin | |
| WORKDIR /app | |
| WORKDIR /app | |
| RUN groupadd -g 1000 app \ | |
| && useradd -d /app -s /bin/bash -g app app \ | |
| && chown -R app:app /app | |
| RUN git clone https://github.com/awilliam/rom-parser && \ | |
| cd rom-parser && \ | |
| make && \ | |
| chmod +x rom-parser && \ | |
| mv rom-parser /usr/local/bin |
|
|
||
| ENV PATH=$PATH:$HOME/.gem/bin | ||
|
|
||
| RUN curl -LO https://github.com/LongSoft/UEFITool/releases/download/A68/UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && unzip UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && mv uefiextract ./3rdparty/UEFIExtract |
There was a problem hiding this comment.
URL doesn't update with argument properly
Suggested change
| RUN curl -LO https://github.com/LongSoft/UEFITool/releases/download/A68/UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && unzip UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && mv uefiextract ./3rdparty/UEFIExtract | |
| RUN curl -LO https://github.com/LongSoft/UEFITool/releases/download/${UEFIExtract_VERSION}/UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && unzip UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && mv uefiextract ./3rdparty/UEFIExtract |
| bundle config set --local path '/app/.gem' && \ | ||
| bundle install --path=vendor/bundle | ||
|
|
||
| ENV PATH=$PATH:$HOME/.gem/bin |
There was a problem hiding this comment.
Home doesn't work well, absolute path is better
Suggested change
| ENV PATH=$PATH:$HOME/.gem/bin | |
| ENV PATH="/app/.gem/bin:$PATH" |
Comment on lines
+28
to
+44
| USER app | ||
|
|
||
| COPY --chown=app:app . . | ||
|
|
||
| # https://github.com/coderobe/VBiosFinder/issues/50 | ||
| # https://github.com/coderobe/VBiosFinder/pull/51 | ||
| RUN git remote add vkhodygo https://github.com/vkhodygo/VBiosFinder.git && \ | ||
| git fetch vkhodygo && \ | ||
| git rebase | ||
|
|
||
| RUN mkdir -p /app/.gem && \ | ||
| bundle config set --local path '/app/.gem' && \ | ||
| bundle install --path=vendor/bundle | ||
|
|
||
| ENV PATH=$PATH:$HOME/.gem/bin | ||
|
|
||
| RUN curl -LO https://github.com/LongSoft/UEFITool/releases/download/A68/UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && unzip UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && mv uefiextract ./3rdparty/UEFIExtract |
There was a problem hiding this comment.
It is much better to layer modules and less frequently changing things first:
USER app
RUN mkdir ./output && mkdir ./3rdparty
RUN curl -LO https://github.com/LongSoft/UEFITool/releases/download/${UEFIExtract_VERSION}/UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && unzip UEFIExtract_NE_${UEFIExtract_VERSION}_x64_linux.zip && mv uefiextract ./3rdparty/UEFIExtract
COPY --chown=app:app Gemfile* ./
# Install the Ruby gems
RUN mkdir -p /app/.gem && \
bundle config set --local path '/app/.gem' && \
bundle install --path=vendor/bundle
COPY --chown=app:app . .
ENV PATH="/app/.gem/bin:$PATH"
Owner
|
not a huge docker fan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal is to make the code easy for others to understand without the need to search for dependencies.
Although the repository is older, it can still be valuable for resourceful individuals who come across it.
50
51