-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile using deb file
31 lines (21 loc) · 1.17 KB
/
dockerfile using deb file
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
# This code uses the deb file from firefox.
# Base image
FROM ubuntu:latest
# Set environment variable to prevent interactive prompts during installation
ENV DEBIAN_FRONTEND=noninteractive
# Install necessary packages: wget, gpg, and apt-transport-https
RUN apt-get update && apt-get install -y wget gpg apt-transport-https
# Create the directory for APT repository keys
RUN install -d -m 0755 /etc/apt/keyrings
# Import Mozilla APT repository signing key
RUN wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | tee /etc/apt/keyrings/packages.mozilla.org.asc
# Add Mozilla APT repository to the sources list
RUN echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee /etc/apt/sources.list.d/mozilla.list
# Set priority for Mozilla repository
RUN echo 'Package: *\nPin: origin packages.mozilla.org\nPin-Priority: 1000\n' | tee /etc/apt/preferences.d/mozilla
# Update package list and install Firefox
RUN apt-get update && apt-get install -y firefox
# Clean up unnecessary files to reduce image size
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Set Firefox as the default command to run
CMD ["firefox"]