First release of my Akkoma Docker image
This commit is contained in:
37
Dockerfile
Normal file
37
Dockerfile
Normal file
@ -0,0 +1,37 @@
|
||||
FROM alpine:3.17
|
||||
|
||||
ENV MIX_ENV prod
|
||||
ENV PATH "${PATH}:/opt/akkoma/bin"
|
||||
ENV AKKOMA_CONFIG_PATH "/config/config.exs"
|
||||
|
||||
# Install required (and optional) packages
|
||||
RUN awk 'NR==2' /etc/apk/repositories | sed 's/main/community/' | tee -a /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk add su-exec curl unzip ncurses file-dev imagemagick ffmpeg exiftool libcrypto1.1
|
||||
|
||||
# Set entrypoint
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
RUN chown root:root /entrypoint.sh && \
|
||||
chmod u+x /entrypoint.sh
|
||||
|
||||
# Create a dedicated user for Akkoma
|
||||
RUN adduser --system --shell /bin/false --home /opt/akkoma akkoma
|
||||
|
||||
# Clone the release build into a temporary directory and unpack it
|
||||
# then move the release to the home directory and delete temporary files
|
||||
RUN curl 'https://akkoma-updates.s3-website.fr-par.scw.cloud/stable/akkoma-amd64-musl.zip' -o /tmp/akkoma.zip && \
|
||||
unzip /tmp/akkoma.zip -d /tmp/ && \
|
||||
mv /tmp/release/* /opt/akkoma && \
|
||||
rmdir /tmp/release && \
|
||||
rm /tmp/akkoma.zip && \
|
||||
chown akkoma -R /opt/akkoma
|
||||
|
||||
VOLUME /data
|
||||
VOLUME /config
|
||||
|
||||
WORKDIR /opt/akkoma
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
CMD [ "pleroma", "start" ]
|
Reference in New Issue
Block a user