Support multiple versions, reduce image size
This commit is contained in:
parent
9284218748
commit
4c95ea8c3a
10
Dockerfile
10
Dockerfile
@ -1,3 +1,7 @@
|
||||
ARG metabase_repo=metabase
|
||||
ARG metabase_version=latest
|
||||
FROM metabase/${metabase_repo}:${metabase_version} as metabase
|
||||
|
||||
# From https://github.com/metabase/metabase/issues/13119#issuecomment-1000350647
|
||||
|
||||
FROM ubuntu:21.04
|
||||
@ -18,13 +22,11 @@ RUN apt-get update -yq && apt-get install -yq bash fonts-dejavu-core fonts-dejav
|
||||
|
||||
|
||||
WORKDIR /app
|
||||
USER metabase
|
||||
|
||||
# copy app from the offical image
|
||||
COPY --from=metabase/metabase:latest /app /app
|
||||
COPY --from=metabase --chown=metabase /app /app
|
||||
|
||||
RUN chown -R metabase /app
|
||||
|
||||
USER metabase
|
||||
# expose our default runtime port
|
||||
EXPOSE 3000
|
||||
|
||||
|
24
README.md
24
README.md
@ -1,5 +1,27 @@
|
||||
# metabase-arm64
|
||||
|
||||
arm64-compatible image of [metabase](https://hub.docker.com/r/metabase/metabase)
|
||||
Multi-arch/arm64-compatible images for [metabase](https://hub.docker.com/r/metabase/metabase)
|
||||
|
||||
Based on https://github.com/metabase/metabase/issues/13119#issuecomment-1000350647
|
||||
|
||||
## Building
|
||||
|
||||
### One-time setup
|
||||
|
||||
Need to use a docker driver that supports multiple platforms (otherwise buildx fails with `error: multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")`).
|
||||
|
||||
```
|
||||
docker buildx create --use
|
||||
```
|
||||
|
||||
### Building latest
|
||||
|
||||
```
|
||||
docker buildx build --push --platform linux/amd64,linux/arm64 --tag scurrilous/metabase:latest .
|
||||
```
|
||||
|
||||
### Building a specific repo and/or version
|
||||
|
||||
```
|
||||
docker buildx build --push --platform linux/amd64,linux/arm64 --tag scurrilous/metabase:enterprise-v1.41.4 --build-arg metabase_repo=metabase-enterprise --build-arg metabase_version=v1.41.4 .
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user