This repository has been archived by the owner on Mar 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
70 lines (57 loc) · 2.24 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# The final image is around 138 MB,
# Build time is around 7 minutes
#
FROM alpine:latest
# ----------------------------------------------------------------------------
# Configuring the image:
ENV PROGDIR=/root
ENV HTPORT=80
ENV HTDOCS=$PROGDIR/list-out
ARG BUILD_DATE
ARG PROJECT_VERSION
VOLUME /tmp/FileCache
EXPOSE $HTPORT
# About:
# http://label-schema.org/rc1/
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.name="Andre's Goodreads Toolbox"
LABEL org.label-schema.description="Tools for Goodreads.com, for finding people based on the books they've read, finding books popular among the people you follow, following new book reviews, etc"
LABEL org.label-schema.maintainer="datakadabra@gmail.com"
LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.version=$PROJECT_VERSION
LABEL org.label-schema.url="https://github.com/andre-st/goodreads-toolbox/blob/master/README.md"
LABEL org.label-schema.vcs-url="https://github.com/andre-st/goodreads-toolbox/"
LABEL org.opencontainers.image.source="https://github.com/andre-st/goodreads-toolbox/"
# ----------------------------------------------------------------------------
# Building the image:
# Use .dockerignore to exclude everything but the minimum necessary set of files.
COPY . $PROGDIR
WORKDIR $PROGDIR/
RUN apk add --no-cache \
build-base \
zlib-dev \
bash \
openssl \
openssl-dev \
perl-dev \
perl-doc \
thttpd \
&& make \
&& apk del --purge build-base openssl-dev zlib-dev \
; rm -rf \
/usr/share/{man,doc,info,groff}/* \
$HOME/.cpan/build/* \
$HOME/.cpan/sources/authors/id \
$HOME/.cpan/cpan_sqlite_log.* \
/tmp/cpan_install_*.txt \
; echo $'\
echo "*******************************************"\n\
echo "*** WELCOME TO ANDRES GOODREADS TOOLBOX ***"\n\
echo "*******************************************"\n\
echo "Available Tools:"\n\
ls -1 *.pl | nl -bn \n\
' > $HOME/.bashrc
# ----------------------------------------------------------------------------
# Running the container:
# bash already in WORKDIR:
ENTRYPOINT thttpd -h 0.0.0.0 -p $HTPORT -d $HTDOCS -l /dev/null && bash