Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bundletool
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker images
bundletool
Commits
6a9bc7fe
Commit
6a9bc7fe
authored
4 months ago
by
Andri Joos
Browse files
Options
Downloads
Patches
Plain Diff
add Dockerfile
parent
4823556a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+44
-0
44 additions, 0 deletions
Dockerfile
with
44 additions
and
0 deletions
Dockerfile
0 → 100644
+
44
−
0
View file @
6a9bc7fe
ARG
DEPENDENCY_DIR="/tmp/dependencies"
ARG
BUNDLETOOL_DIR="bundletool"
ARG
BUNDLETOOL_FILENAME="bundletool.jar"
FROM
ubuntu:24.04
AS
download
ARG
DEPENDENCY_DIR
ARG
BUNDLETOOL_DIR
ARG
BUNDLETOOL_FILENAME
ARG
BUNDLETOOL_DIR="${DEPENDENCY_DIR}/${BUNDLETOOL_DIR}"
ARG
BUNDLETOOL_FILE="${BUNDLETOOL_DIR}/${BUNDLETOOL_FILENAME}"
ARG
BUNDLETOOL_VERSION="1.17.2"
RUN
apt update
\
&&
apt
install
-y
wget
RUN
mkdir
-p
${
BUNDLETOOL_DIR
}
\
&&
wget
"https://github.com/google/bundletool/releases/download/
${
BUNDLETOOL_VERSION
}
/bundletool-all-
${
BUNDLETOOL_VERSION
}
.jar"
-O
${
BUNDLETOOL_FILE
}
FROM
alpine:3
ARG
DEPENDENCY_DIR
ARG
USER_UID="1000"
ARG
USER_GID=$USER_UID
ARG
USERNAME="bundletool"
ARG
BUNDLETOOL_DIR
ARG
BUNDLETOOL_FILENAME
ARG
BUNDLETOOL_DIR="/${BUNDLETOOL_DIR}"
ARG
BUNDLETOOL_FILE="${BUNDLETOOL_DIR}/${BUNDLETOOL_FILENAME}"
ARG
BUNDLETOOL_BIN=/bin/bundletool
COPY
--from=download ${DEPENDENCY_DIR} /
RUN
apk add
--no-cache
bash openjdk17-jdk
\
&&
addgroup
${
USERNAME
}
-g
${
USER_GID
}
\
&&
adduser
${
USERNAME
}
--uid
${
USER_UID
}
--ingroup
${
USERNAME
}
--disabled-password
\
&&
echo
-e
'#!/bin/bash\njava -jar '
"
$BUNDLETOOL_FILE
"
' "$@"'
>
${
BUNDLETOOL_BIN
}
\
&&
chmod
+x
${
BUNDLETOOL_BIN
}
USER
${USERNAME}
# Test
# RUN bash /bin/bundletool --help && exit 1
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment