forked from devgeniem/docker-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (58 loc) · 2.54 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
FROM ubuntu:22.04
LABEL maintainer="[email protected]"
# Build arguments
ARG S6_OVERLAY_VERSION=3.1.2.1
ARG S6_OVERLAY_NOARCH_SHA256=cee89d3eeabdfe15239b2c5c3581d9352d2197d4fd23bba3f1e64bf916ccf496
ARG S6_OVERLAY_X86_SHA256=6019b6b06cfdbb1d1cd572d46b9b158a4904fd19ca59d374de4ddaaa6a3727d5
ARG S6_OVERLAY_SYMLINKS_SHA256=1e36efb936084fddffe6c55dae8f478e7b2d70f77db2caaceb78c7425b9a7956
ARG GOSU_VERSION=1.10
ARG DEBIAN_FRONTEND=noninteractive
# Finland is quite nice place to live.
# Instead of forking this you should move your living address here.
ENV TZ="Europe/Helsinki"
RUN echo "cachebust-2"
RUN set -x \
# Update sources and upgrade all packages
&& apt update -y \
&& apt upgrade -y \
&& apt install -y apt-utils \
# Install ca-certificates
&& apt install -y curl ca-certificates jq iputils-ping \
&& apt install -y tzdata locales gettext gosu xz-utils \
# Set timezone
&& locale-gen "en_US.UTF-8" \
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
&& dpkg-reconfigure tzdata
RUN \
##
# Add S6-overlay to use S6 process manager
# source: https://github.com/just-containers/s6-overlay/#the-docker-way
##
curl -L -o /tmp/download.tar.xz https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz \
&& echo "${S6_OVERLAY_NOARCH_SHA256} /tmp/download.tar.xz" | sha256sum -c \
&& tar -Jxpf /tmp/download.tar.xz -C / \
&& curl -L -o /tmp/download.tar.xz https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz \
&& echo "${S6_OVERLAY_X86_SHA256} /tmp/download.tar.xz" | sha256sum -c \
&& tar -Jxpf /tmp/download.tar.xz -C / \
&& curl -L -o /tmp/download.tar.xz https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz \
&& echo "${S6_OVERLAY_SYMLINKS_SHA256} /tmp/download.tar.xz" | sha256sum -c \
&& tar -Jxpf /tmp/download.tar.xz -C /
RUN \
##
# Create a few aliases
##
# ll
echo "#!/bin/sh \nls -lah \"\$@\"" > /usr/local/bin/ll \
# la
&& echo "#!/bin/sh \nls -A \"\$@\"" > /usr/local/bin/la \
# l
&& echo "#!/bin/sh \nls -CF \"\$@\"" > /usr/local/bin/l \
&& chmod a+x /usr/local/bin/ll /usr/local/bin/la /usr/local/bin/l \
# Cleanup
&& apt-get remove --purge -y $(apt-mark showauto) \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/log/apt/*
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENTRYPOINT ["/init"]