Skip to content

Commit 45e7ea6

Browse files
committed
Alpine
1 parent 21965b3 commit 45e7ea6

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

Dockerfile

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
1-
# ### BUILD MAIN IMAGE START ###
2-
FROM ubuntu
1+
### BUILD JACRED MULTIARCH START ###
2+
FROM --platform=$BUILDPLATFORM alpine AS builder
3+
4+
WORKDIR /app
35

4-
RUN apt update && apt -y install curl systemd tor tor-geoipdb privoxy
5-
COPY ./privoxy.config /etc/privoxy/config
6+
# Get and unpack JacRed
7+
RUN apk --no-cache --update add bash wget unzip
8+
RUN wget https://github.com/immisterio/jacred-fdb/releases/latest/download/publish.zip
9+
RUN unzip -o publish.zip
10+
RUN rm -f publish.zip
11+
### BUILD JACRED MULTIARCH END ###
12+
13+
# ### BUILD MAIN IMAGE START ###
14+
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine
615

7-
COPY ./install.sh /
8-
COPY ./update.sh /
16+
ENV JACRED_HOME=/home/jacred
17+
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
918

10-
RUN sh /install.sh
19+
COPY --from=builder /app $JACRED_HOME/
1120

12-
WORKDIR /home/jacred
21+
RUN apk --no-cache --update add icu-libs
1322

14-
RUN crontab Data/crontab
23+
WORKDIR $JACRED_HOME
1524

1625
EXPOSE 9117
1726

18-
VOLUME [ "/home/jacred/init.conf", "/home/jacred/Data" ]
27+
VOLUME [ "$JACRED_HOME/init.conf", "$JACRED_HOME/Data" ]
1928

20-
ENTRYPOINT ["/lib/systemd/systemd"]
29+
ENTRYPOINT ["dotnet", "JacRed.dll"]
2130
### BUILD MAIN IMAGE end ###

0 commit comments

Comments
 (0)