-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from umccr/feature/add-ici-uploader-4-0-3
Added ici-uploader as a multi-arch image
- Loading branch information
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM alpine:3 | ||
|
||
# ARGS | ||
# Target platform (linux/amd64, linux/arm64) | ||
ARG TARGETPLATFORM | ||
|
||
# For the ici-uploader | ||
ARG ICI_HOME="/usr/local/bin/share/ici-uploader" | ||
|
||
# User args (we run from a non-root user) | ||
ARG USER="ici_user" | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
ARG GROUP="ici_user" | ||
|
||
# ENV | ||
ENV ICI_HOME="${ICI_HOME}" | ||
|
||
# RUN | ||
# Install Java | ||
RUN apk update && \ | ||
apk add \ | ||
openjdk11 \ | ||
tar \ | ||
bash && \ | ||
mkdir -p "${ICI_HOME}" | ||
|
||
# Add and extract tarball | ||
ADD "ici-uploader.${TARGETPLATFORM#linux/}.tar.gz" "${ICI_HOME%ici-uploader}" | ||
ADD "ici-uploader.sh" "/usr/local/bin/ici-uploader" | ||
|
||
# Change permissions | ||
RUN chmod a+r "${ICI_HOME}/" && \ | ||
chmod a+x "${ICI_HOME}/ici-uploader" && \ | ||
chmod a+x "/usr/local/bin/ici-uploader" | ||
|
||
# Add a non-root user | ||
RUN addgroup \ | ||
--system \ | ||
--gid "${GID}" \ | ||
"${GROUP}" && \ | ||
adduser \ | ||
--system \ | ||
--disabled-password \ | ||
--ingroup "${GROUP}" \ | ||
--uid "${UID}" \ | ||
"$USER" | ||
|
||
# Change ownership | ||
USER "$USER" | ||
|
||
# Add a softlink from the user home to the ici-uploader | ||
RUN mkdir -p "/home/${USER}/.illumina/" && \ | ||
ln -s "${ICI_HOME}" "/home/${USER}/.illumina/ici-uploader" | ||
|
||
CMD [ "ici-uploader" ] |
Git LFS file not shown
Git LFS file not shown
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Start the daemon | ||
"${ICI_HOME}/ici-uploader" start-daemon 1>/dev/null 2>&1 | ||
|
||
# Run the ici-uploader command | ||
"${ICI_HOME}/ici-uploader" "${@:1}" |