Skip to content

Commit

Permalink
properly expose pleroma_ctl
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredallard committed Dec 19, 2024
1 parent c525420 commit d6b0e0c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
ARG VCS_REF
ARG BUILD_DATE

FROM hexpm/elixir:1.17.2-erlang-27.0.1-alpine-3.20.2 as base
FROM base as builder
FROM hexpm/elixir:1.17.2-erlang-27.0.1-alpine-3.20.2 AS base
FROM base AS builder
ENV MIX_ENV=prod
ENV ERL_EPMD_ADDRESS=127.0.0.1
ARG VCS_REF
Expand All @@ -29,7 +29,7 @@ RUN mix local.hex --force &&\
mix local.rebar --force &&\
mix do deps.get, deps.compile, compile, phx.digest, release

FROM alpine:3.21 as runtime
FROM alpine:3.21 AS runtime
ARG VCS_REF
ARG BUILD_DATE
LABEL org.opencontainers.image.title="akkoma" \
Expand All @@ -42,9 +42,10 @@ LABEL org.opencontainers.image.title="akkoma" \
org.opencontainers.image.created=$BUILD_DATE
EXPOSE 4000

CMD trap 'exit' INT; /opt/akkoma/bin/pleroma start
CMD trap 'exit' INT; pleroma start

Check warning on line 45 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

WORKDIR /opt/akkoma
ENV PATH /opt/akkoma/bin:$PATH

Check warning on line 48 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# Create a user for running the app
RUN addgroup -g 1000 akkoma && \
Expand All @@ -55,7 +56,6 @@ RUN apk add --no-cache file-dev exiftool ffmpeg imagemagick libmagic ncurses pos

# Copy the files from the builder image over.
COPY --chown=1000:1000 --from=builder /opt/akkoma/_build/prod/rel/pleroma .
COPY --chown=1000:1000 --from=builder /opt/akkoma/_build/prod/rel/pleroma_ctl .

USER akkoma

0 comments on commit d6b0e0c

Please sign in to comment.