Refactored dockerfile

This commit is contained in:
Christoffer Nissen
2022-01-18 21:48:30 +01:00
parent a8faebd7db
commit 16a77bdf18

View File

@@ -1,23 +1,10 @@
FROM debian:latest FROM debian:latest
LABEL author=stifstof LABEL author=stifstof
ENV DEBIAN_FRONTEND noninteractive RUN apt-get update -qy
RUN apt-get update # General Desktop dependencies not caught by apt-get
RUN apt-get install -qy curl ca-certificates sudo libxkbfile1 RUN apt-get install -qy \
RUN apt-get install -y \
curl \
fonts-noto-color-emoji \
libsecret-1-0 \
pulseaudio \
gnupg2 \
&& curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - \
&& sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/ms-teams stable main" > /etc/apt/sources.list.d/teams.list' \
&& apt-get -y update \
&& apt-get -y install teams
RUN apt-get install -y \
gvfs-bin \ gvfs-bin \
libglib2.0-bin \ libglib2.0-bin \
trash-cli \ trash-cli \
@@ -38,8 +25,22 @@ RUN apt-get install -y \
mesa-utils \ mesa-utils \
libgl1-mesa-glx libgl1-mesa-glx
# Grab the client .deb # Install teams and teams specific dependencies
# Install the client .deb RUN apt-get install -qy \
curl \
ca-certificates \
sudo \
libxkbfile1 \
fonts-noto-color-emoji \
libsecret-1-0 \
pulseaudio \
gnupg2 \
&& curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - \
&& sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/ms-teams stable main" > /etc/apt/sources.list.d/teams.list' \
&& apt-get -y update \
&& apt-get -y install teams
# Copy scripts to correct location (/var/cache is host machine)
COPY docker-scripts/xdg-open /usr/local/bin/ COPY docker-scripts/xdg-open /usr/local/bin/
COPY host-scripts/ /var/cache/teams/ COPY host-scripts/ /var/cache/teams/
COPY docker-scripts/entrypoint.sh /sbin/entrypoint.sh COPY docker-scripts/entrypoint.sh /sbin/entrypoint.sh
@@ -48,4 +49,7 @@ RUN chmod 755 /sbin/entrypoint.sh
# Cleanup # Cleanup
RUN rm -rf /var/lib/apt/lists/* RUN rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/sbin/entrypoint.sh"] # Check version of teams
RUN apt show teams | grep "Version:" && echo ""
ENTRYPOINT ["/sbin/entrypoint.sh"]