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

Update Dockerfile to resolve errors #46

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

menger5
Copy link
Contributor

@menger5 menger5 commented Aug 26, 2024

Updated ENV variables and added command to RUN variable to answer prompt

Description

Provide an overview...


Dockerfile Structure and Organization:

  • Does the Dockerfile build?
  • Is tool organized according to Repository Structure?
  • Specific base image with a version tag, e.g., FROM ubuntu:20.04 instead of FROM ubuntu.
  • Add comments to describe each Dockerfile step.

Metadata

Include the following LABELs:

  • LABEL maintainer="Your Name <[email protected]>"
  • LABEL base-image="ubuntu:22.04"
  • LABEL description="Short description of the purpose of this image"
  • LABEL software-website="https://example.com"
  • LABEL software-version="1.0.0"
  • LABEL license="https://www.example.com/legal/end-user-software-license-agreement"

File and Resource Management:

  • Store scripts, files, and software tools ONLY in /opt.
  • Removing tar files after extraction and delete temporary files and caches generated during the build process.
  • Ensure sensitive data (e.g., API keys, passwords) is not hardcoded in the Dockerfile.

Container Behavior

  • Specify a meaningful CMD to define how the container should run by default (help message is a good default).

Assign reviewer

Updated ENV variables and added command to RUN variable to answer prompt
ENV DEBIAN_FRONTEND noninteractive
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
Copy link
Contributor

Choose a reason for hiding this comment

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

https://gist.github.com/jaamarks/e2c5c3c465b532e1610edc37d5649e93

Please review the above gist and implement the necessary changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

variable changed based on recommendations in gist

@jaamarks
Copy link
Contributor

Also,

  • why is getopt installed twice?
  • combine the install.packages commands
  • put sessioninfo() on a new line.
# Configure CRAN for package retrieval
RUN echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile
RUN Rscript -e "install.packages('getopt', dependencies = T)"
RUN Rscript -e "install.packages(c('dplyr', 'httr', 'stringr','lubridate','sevenbridges2'), dependencies = T)"
RUN Rscript -e "library('getopt');##### R SESSION INFORMATION #####; sessionInfo()"

RUN Rscript -e "install.packages(c('dplyr', 'httr', 'stringr','lubridate','sevenbridges2'), dependencies = T)"
RUN Rscript -e "library('getopt');##### R SESSION INFORMATION #####; sessionInfo()"
RUN Rscript -e "install.packages(c('getopt', 'dplyr', 'httr', 'stringr','lubridate','sevenbridges2'), dependencies = T)"
RUN Rscript -e "library('getopt'); ##### R SESSION INFORMATION #####; sessionInfo()"
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Why is getopt installed twice?
  • is there a reason why this is all on one line? If not, please put the comment and sessionInfo() command on a new line.

@jaamarks jaamarks merged commit 7e1accb into RTIInternational:master Aug 26, 2024
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.

2 participants