forked from jlesage/docker-firefox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
102 lines (88 loc) · 2.93 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
# firefox Dockerfile
#
# https://github.com/jlesage/docker-firefox
#
# Build the membarrier check tool.
FROM alpine:3.14 AS membarrier
WORKDIR /tmp
COPY membarrier_check.c .
RUN apk --no-cache add build-base linux-headers
RUN gcc -static -o membarrier_check membarrier_check.c
RUN strip membarrier_check
# Pull base image.
FROM jlesage/baseimage-gui:alpine-3.20-v4.6.4
# Docker image version is provided via build arg.
ARG DOCKER_IMAGE_VERSION=
# Define software versions.
ARG FIREFOX_VERSION=128.0.3-r0
#ARG PROFILE_CLEANER_VERSION=2.36
# Define software download URLs.
#ARG PROFILE_CLEANER_URL=https://github.com/graysky2/profile-cleaner/raw/v${PROFILE_CLEANER_VERSION}/common/profile-cleaner.in
# Define working directory.
WORKDIR /tmp
# Install Firefox.
RUN \
# add-pkg --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
# --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
# --upgrade firefox=${FIREFOX_VERSION}
add-pkg firefox=${FIREFOX_VERSION}
# Install extra packages.
RUN \
add-pkg \
# WebGL support.
mesa-dri-gallium \
# Audio support.
libpulse \
# Icons used by folder/file selection window (when saving as).
adwaita-icon-theme \
# A font is needed.
font-dejavu \
# The following package is used to send key presses to the X process.
xdotool \
&& \
# Remove unneeded icons.
find /usr/share/icons/Adwaita -type d -mindepth 1 -maxdepth 1 -not -name 16x16 -not -name scalable -exec rm -rf {} ';' && \
true
# Install profile-cleaner.
#RUN \
# add-pkg --virtual build-dependencies curl && \
# curl -# -L -o /usr/bin/profile-cleaner {$PROFILE_CLEANER_URL} && \
# sed-patch 's/@VERSION@/'${PROFILE_CLEANER_VERSION}'/' /usr/bin/profile-cleaner && \
# chmod +x /usr/bin/profile-cleaner && \
# add-pkg \
# bash \
# file \
# coreutils \
# bc \
# parallel \
# sqlite \
# && \
# # Cleanup.
# del-pkg build-dependencies && \
# rm -rf /tmp/* /tmp/.[!.]*
# Generate and install favicons.
RUN \
APP_ICON_URL=https://github.com/jlesage/docker-templates/raw/master/jlesage/images/firefox-icon.png && \
install_app_icon.sh "$APP_ICON_URL"
# Add files.
COPY rootfs/ /
COPY --from=membarrier /tmp/membarrier_check /usr/bin/
# Set internal environment variables.
RUN \
set-cont-env APP_NAME "Firefox" && \
set-cont-env APP_VERSION "$FIREFOX_VERSION" && \
set-cont-env DOCKER_IMAGE_VERSION "$DOCKER_IMAGE_VERSION" && \
true
# Set public environment variables.
ENV \
FF_OPEN_URL= \
FF_KIOSK=0 \
FF_CUSTOM_ARGS=
# Metadata.
LABEL \
org.label-schema.name="firefox" \
org.label-schema.description="Docker container for Firefox" \
org.label-schema.version="${DOCKER_IMAGE_VERSION:-unknown}" \
org.label-schema.vcs-url="https://github.com/jlesage/docker-firefox" \
org.label-schema.schema-version="1.0"