Skip to content

Commit dec6d80

Browse files
authored
Use alpine docker image (benbusby#573)
1 parent f6c0843 commit dec6d80

File tree

2 files changed

+30
-33
lines changed

2 files changed

+30
-33
lines changed

Dockerfile

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,57 @@
1-
FROM python:3.8-slim as builder
1+
FROM python:3.8-alpine as builder
22

3-
RUN apt-get update && apt-get install -y \
4-
build-essential \
3+
RUN apk --update add \
4+
build-base \
55
libxml2-dev \
66
libxslt-dev \
7-
libssl-dev \
7+
openssl-dev \
88
libffi-dev
9-
9+
1010
COPY requirements.txt .
1111

1212
RUN pip install --prefix /install --no-warn-script-location --no-cache-dir -r requirements.txt
1313

14-
FROM python:3.8-slim
14+
FROM python:3.8-alpine
1515

16-
RUN apt-get update && apt-get install -y \
17-
libcurl4-openssl-dev \
18-
tor \
19-
curl \
20-
&& rm -rf /var/lib/apt/lists/*
16+
RUN apk add --update --no-cache tor curl bash openrc
17+
# libcurl4-openssl-dev
2118

2219
ARG config_dir=/config
2320
RUN mkdir -p $config_dir
2421
VOLUME $config_dir
25-
ENV CONFIG_VOLUME=$config_dir
2622

2723
ARG username=''
28-
ENV WHOOGLE_USER=$username
2924
ARG password=''
30-
ENV WHOOGLE_PASS=$password
31-
3225
ARG proxyuser=''
33-
ENV WHOOGLE_PROXY_USER=$proxyuser
3426
ARG proxypass=''
35-
ENV WHOOGLE_PROXY_PASS=$proxypass
3627
ARG proxytype=''
37-
ENV WHOOGLE_PROXY_TYPE=$proxytype
3828
ARG proxyloc=''
39-
ENV WHOOGLE_PROXY_LOC=$proxyloc
40-
4129
ARG whoogle_dotenv=''
42-
ENV WHOOGLE_DOTENV=$whoogle_dotenv
43-
4430
ARG use_https=''
45-
ENV HTTPS_ONLY=$use_https
46-
4731
ARG whoogle_port=5000
48-
ENV EXPOSE_PORT=$whoogle_port
49-
5032
ARG twitter_alt='farside.link/nitter'
51-
ENV WHOOGLE_ALT_TW=$twitter_alt
5233
ARG youtube_alt='farside.link/invidious'
53-
ENV WHOOGLE_ALT_YT=$youtube_alt
5434
ARG instagram_alt='farside.link/bibliogram'
55-
ENV WHOOGLE_ALT_IG=$instagram_alt
5635
ARG reddit_alt='farside.link/libreddit'
57-
ENV WHOOGLE_ALT_RD=$reddit_alt
5836
ARG medium_alt='farside.link/scribe'
59-
ENV WHOOGLE_ALT_MD=$medium_alt
6037
ARG translate_alt='lingva.ml'
61-
ENV WHOOGLE_ALT_TL=$translate_alt
38+
39+
ENV CONFIG_VOLUME=$config_dir \
40+
WHOOGLE_USER=$username \
41+
WHOOGLE_PASS=$password \
42+
WHOOGLE_PROXY_USER=$proxyuser \
43+
WHOOGLE_PROXY_PASS=$proxypass \
44+
WHOOGLE_PROXY_TYPE=$proxytype \
45+
WHOOGLE_PROXY_LOC=$proxyloc \
46+
WHOOGLE_DOTENV=$whoogle_dotenv \
47+
HTTPS_ONLY=$use_https \
48+
EXPOSE_PORT=$whoogle_port \
49+
WHOOGLE_ALT_TW=$twitter_alt \
50+
WHOOGLE_ALT_YT=$youtube_alt \
51+
WHOOGLE_ALT_IG=$instagram_alt \
52+
WHOOGLE_ALT_RD=$reddit_alt \
53+
WHOOGLE_ALT_MD=$medium_alt \
54+
WHOOGLE_ALT_TL=$translate_alt
6255

6356
WORKDIR /whoogle
6457

misc/tor/start-tor.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
if [ "$(whoami)" != "root" ]; then
44
tor -f /etc/tor/torrc
55
else
6-
service tor start
6+
if (grep alpine /etc/os-release >/dev/null); then
7+
rc-service tor start
8+
else
9+
service tor start
10+
fi
711
fi

0 commit comments

Comments
 (0)