mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
e10c5c9579
9178e8a75f
feat: add smob and provenance in release for dockerhub; use jammy; apt remove as possible (pasta) Pull request description: ## Issue being fixed or feature implemented Docker provenance refers to the origin and history of Docker images, including how they were built, modified, and by whom. An SBOM (Software Bill of Materials) is a detailed list of all components in a software application, providing transparency about libraries, dependencies, and versions used, which is crucial for security and compliance. ## What was done? Add SBOM and provenance to docker build; this may allow some level of validation that GitHub actions is actually doing what it says it is. See this for more information https://docs.docker.com/build/ci/github-actions/attestations/ ## How Has This Been Tested? Building with buildx with sbom and provenance flags locally ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK9178e8a75f
Tree-SHA512: 6e3f35a0b30f002e2d5d80d6dd18ee554a1c15c62c1d4cbe1185f38977f55a199998515cf5bb9a027670f068f3d56ef33faa062d8c4122a886375d00afe6bf2f
54 lines
1.6 KiB
Docker
54 lines
1.6 KiB
Docker
FROM ubuntu:jammy
|
|
LABEL maintainer="Dash Developers <dev@dash.org>"
|
|
LABEL description="Dockerised DashCore"
|
|
|
|
ARG USER_ID
|
|
ARG GROUP_ID
|
|
ARG TAG
|
|
ARG GITHUB_REPOSITORY
|
|
|
|
ENV HOME /home/dash
|
|
|
|
# add user with specified (or default) user/group ids
|
|
ENV USER_ID ${USER_ID:-1000}
|
|
ENV GROUP_ID ${GROUP_ID:-1000}
|
|
RUN groupadd -g ${GROUP_ID} dash && \
|
|
useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash && \
|
|
mkdir /home/dash/.dashcore && \
|
|
chown ${USER_ID}:${GROUP_ID} -R /home/dash
|
|
|
|
RUN apt-get update && \
|
|
apt-get -y install --no-install-recommends \
|
|
wget \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN echo "https://github.com/${GITHUB_REPOSITORY}/releases/download/v${TAG}/dashcore-${TAG}-$arch.tar.gz"
|
|
|
|
RUN mach=$(uname -m) \
|
|
&& case $mach in aarch64) arch="aarch64-linux-gnu"; ;; x86_64) arch="x86_64-linux-gnu"; ;; *) echo "ERROR: Machine type $mach not supported."; ;; esac \
|
|
&& wget https://github.com/${GITHUB_REPOSITORY}/releases/download/v${TAG}/dashcore-${TAG}-$arch.tar.gz -P /tmp \
|
|
&& tar -xvf /tmp/dashcore-*.tar.gz -C /tmp/ \
|
|
&& find /tmp/dashcore*/bin -type f ! -name 'dash-qt' -exec cp {} /usr/local/bin \; \
|
|
&& rm -rf /tmp/dashcore* \
|
|
&& chmod a+x /usr/local/bin/*
|
|
|
|
RUN apt-get update && \
|
|
apt list --installed && \
|
|
apt-get -y purge \
|
|
wget \
|
|
ca-certificates \
|
|
&& apt-get -y autoremove \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
USER dash
|
|
|
|
VOLUME ["/home/dash"]
|
|
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
EXPOSE 9998 9999 19998 19999
|
|
|
|
WORKDIR /home/dash
|