chore: format and optimize Dockerfiles (#256)
This commit is contained in:
parent
b283c60b6c
commit
c35ef22abf
|
@ -1,17 +1,19 @@
|
|||
FROM ubuntu:22.04
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Install the Docker apt repository
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get install --yes ca-certificates
|
||||
apt-get upgrade --yes && \
|
||||
apt-get install --yes ca-certificates && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
COPY docker-archive-keyring.gpg /usr/share/keyrings/docker-archive-keyring.gpg
|
||||
COPY docker.list /etc/apt/sources.list.d/docker.list
|
||||
|
||||
# Install baseline packages
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get install --yes \
|
||||
apt-get install --yes \
|
||||
bash \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
|
@ -36,7 +38,8 @@ RUN apt-get update && \
|
|||
rsync && \
|
||||
# Install latest Git using their official PPA
|
||||
add-apt-repository ppa:git-core/ppa && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get install --yes git
|
||||
apt-get install --yes git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Enables Docker starting with systemd
|
||||
RUN systemctl enable docker
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Server=https://archive.archlinux.org/repos/2021/02/01/$repo/os/$arch
|
|
@ -8,10 +8,8 @@ RUN apt-get update && \
|
|||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
sudo
|
||||
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
sudo \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN useradd coder \
|
||||
--create-home \
|
||||
|
|
Loading…
Reference in New Issue