Dockerfile: Difference between revisions

From Svacer Wiki
mNo edit summary
(update due to binaries split)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


<pre>
<pre>
FROM ubuntu:18.04
FROM ubuntu:22.04


LABEL maintainer="akuzmin@ispras.ru"
LABEL maintainer="akuzmin@ispras.ru"
Line 12: Line 12:
     && mkdir -p /svacer/bin && mkdir -p /svacer/store  
     && mkdir -p /svacer/bin && mkdir -p /svacer/store  


COPY svacer/bin/svacer-server /svacer/bin/
COPY svacer/bin/svacer /svacer/bin/
COPY svacer/bin/svacer /svacer/bin/


WORKDIR /
WORKDIR /svacer/bin


ENV STORE=/svacer/store
ENV STORE=/svacer/store
ENV SVACER_PG_URL=postgres://svace:svace@127.0.0.1:5432/svace
ENV SVACER_PG_URL=postgres://svace:svace@127.0.0.1:5432/svace
ENV MEMSETTINGS=default
ENV MEMSETTINGS=default
ENV PATH=/svacer/bin:$PATH


EXPOSE 8080
EXPOSE 8080


CMD /svacer/bin/svacer --memsettings=${MEMSETTINGS} server --store $STORE --pg $SVACER_PG_URL
CMD /svacer/bin/svacer-server --memsettings=${MEMSETTINGS} run --store $STORE --pg $SVACER_PG_URL
 
</pre>
</pre>

Latest revision as of 13:37, 7 May 2024

Для сборки докер-образа Svacer мы используем следующий Dockerfile:

FROM ubuntu:22.04

LABEL maintainer="akuzmin@ispras.ru"

ARG DEBIAN_FRONTEND=noninteractive

RUN apt update && apt install -y --no-install-recommends curl \
    && rm -rf /var/cache/apt/archives /var/lib/apt/lists/* \
    && mkdir -p /svacer/bin && mkdir -p /svacer/store 

COPY svacer/bin/svacer-server /svacer/bin/
COPY svacer/bin/svacer /svacer/bin/

WORKDIR /svacer/bin

ENV STORE=/svacer/store
ENV SVACER_PG_URL=postgres://svace:svace@127.0.0.1:5432/svace
ENV MEMSETTINGS=default
ENV PATH=/svacer/bin:$PATH

EXPOSE 8080

CMD /svacer/bin/svacer-server --memsettings=${MEMSETTINGS} run --store $STORE --pg $SVACER_PG_URL