mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-31 11:18:57 +08:00
Now uses slim image (#552)
This commit is contained in:
parent
6712fe0689
commit
b290d3e040
1 changed files with 17 additions and 8 deletions
25
Dockerfile
25
Dockerfile
|
@ -1,8 +1,13 @@
|
||||||
# Stage 1
|
# Stage 1
|
||||||
# Builds the Livebook release
|
# Builds the Livebook release
|
||||||
FROM hexpm/elixir:1.12.0-erlang-24.0-alpine-3.13.3 AS build
|
FROM hexpm/elixir:1.12.3-erlang-24.0.6-debian-buster-20210902-slim AS build
|
||||||
|
|
||||||
RUN apk add --no-cache build-base git
|
RUN apt-get update && apt-get upgrade -y && \
|
||||||
|
apt-get install --no-install-recommends -y \
|
||||||
|
build-essential git && \
|
||||||
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
|
||||||
|
apt-get clean -y && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
@ -32,13 +37,17 @@ RUN mix do compile, release
|
||||||
# We use the same base image, because we need Erlang, Elixir and Mix
|
# We use the same base image, because we need Erlang, Elixir and Mix
|
||||||
# during runtime to spawn the Livebook standalone runtimes.
|
# during runtime to spawn the Livebook standalone runtimes.
|
||||||
# Consequently the release doesn't include ERTS as we have it anyway.
|
# Consequently the release doesn't include ERTS as we have it anyway.
|
||||||
FROM hexpm/elixir:1.12.0-erlang-24.0-alpine-3.13.3
|
FROM hexpm/elixir:1.12.3-erlang-24.0.6-debian-buster-20210902-slim
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apt-get update && apt-get upgrade -y && \
|
||||||
# Runtime dependencies
|
apt-get install --no-install-recommends -y \
|
||||||
openssl ncurses-libs \
|
# Runtime dependencies
|
||||||
# In case someone uses `Mix.install/2` and point to a git repo
|
build-essential ca-certificates libncurses5-dev \
|
||||||
git
|
# In case someone uses `Mix.install/2` and point to a git repo
|
||||||
|
git && \
|
||||||
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
|
||||||
|
apt-get clean -y && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Run in the /data directory by default, makes for
|
# Run in the /data directory by default, makes for
|
||||||
# a good place for the user to mount local volume
|
# a good place for the user to mount local volume
|
||||||
|
|
Loading…
Reference in a new issue