1 Star 0 Fork 2

宿叶露/asciinema-server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
Marcin Kulik 提交于 2021-11-06 18:44 . Upgrade Erlang, Elixir and Alpine
ARG ALPINE_VERSION=3.14.2
ARG ERLANG_OTP_VERSION=24.1.4
ARG ELIXIR_VERSION=1.12.1
## Release building image
# https://github.com/hexpm/bob#docker-images
FROM hexpm/elixir:${ELIXIR_VERSION}-erlang-${ERLANG_OTP_VERSION}-alpine-${ALPINE_VERSION} as builder
ARG MIX_ENV=prod
WORKDIR /opt/app
RUN apk upgrade && \
apk add \
nodejs \
npm \
rust \
cargo \
build-base && \
mix local.rebar --force && \
mix local.hex --force
COPY mix.* ./
RUN mix do deps.get --only prod, deps.compile
COPY assets/ assets/
RUN cd assets && \
npm install && \
npm run deploy
COPY config/config.exs config/
COPY config/prod.exs config/
RUN mix phx.digest
COPY config/*.exs config/
COPY lib lib/
COPY priv priv/
COPY native native/
# recompile sentry with our source code
RUN mix deps.compile sentry --force
COPY rel rel/
# temporary workaround to make rustler work with OTP 24
ENV RUSTLER_NIF_VERSION 2.15
RUN mix release
# Final image
FROM alpine:${ALPINE_VERSION}
RUN apk add --no-cache \
libstdc++ \
tini \
bash \
ca-certificates \
librsvg \
ttf-dejavu \
pngquant
WORKDIR /opt/app
COPY --from=builder /opt/app/_build/prod/rel/asciinema .
RUN chgrp -R 0 /opt/app && chmod -R g=u /opt/app
COPY .iex.exs .
ENV PORT 4000
ENV DATABASE_URL "postgresql://postgres@postgres/postgres"
ENV RSVG_FONT_FAMILY "Dejavu Sans Mono"
ENV PATH "/opt/app/bin:${PATH}"
VOLUME /opt/app/uploads
VOLUME /opt/app/cache
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/opt/app/bin/asciinema", "start"]
EXPOSE 4000
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/suyelu/asciinema-server.git
[email protected]:suyelu/asciinema-server.git
suyelu
asciinema-server
asciinema-server
develop

搜索帮助