瀏覽代碼

Pin builders to Ansible 2.10

Pins builders to use latest Ansible 2.10 and
cleans up some redundant packages.
Antony Messerli 4 年之前
父節點
當前提交
7eb20a7916
共有 3 個文件被更改,包括 17 次插入22 次删除
  1. 8 11
      Dockerfile-build
  2. 8 11
      Dockerfile-build.production
  3. 1 0
      roles/netbootxyz/vars/ubuntu.yml

+ 8 - 11
Dockerfile-build

@@ -1,4 +1,4 @@
-FROM ubuntu:focal as builder
+FROM ubuntu:20.04 as builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 
@@ -6,26 +6,23 @@ RUN \
  echo "**** install deps ****" && \
  apt-get update && \
  apt-get install -y \
-	ansible \
-	apache2  \
-	build-essential \
-	dosfstools \
-	genisoimage \
-	git \
-	liblzma-dev \
-	python-yaml \
-	syslinux
+      git \
+      python3-pip \
+      python3-setuptools \
+      syslinux
 
 # repo for build
 COPY . /ansible
 
+RUN pip3 install ansible==2.10.0
+
 RUN \
  echo "**** running ansible ****" && \
  cd /ansible && \
  ansible-playbook -i inventory site.yml
 
 # runtime stage
-FROM alpine:3.11
+FROM alpine:3.12
 
 COPY --from=builder /var/www/html/ /mnt/
 COPY docker-build-root/ /

+ 8 - 11
Dockerfile-build.production

@@ -1,4 +1,4 @@
-FROM ubuntu:focal as builder
+FROM ubuntu:20.04 as builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 
@@ -6,26 +6,23 @@ RUN \
  echo "**** install deps ****" && \
  apt-get update && \
  apt-get install -y \
-	ansible \
-	apache2  \
-	build-essential \
-	dosfstools \
-	genisoimage \
-	git \
-	liblzma-dev \
-	python-yaml \
-	syslinux
+      git \
+      python3-pip \
+      python3-setuptools \
+      syslinux
 
 # repo for build
 COPY . /ansible
 
+RUN pip3 install ansible==2.10.0
+
 RUN \
  echo "**** running ansible ****" && \
  cd /ansible && \
  ansible-playbook -i inventory site.yml --extra-vars "@script/netbootxyz-overrides.yml"
 
 # runtime stage
-FROM alpine:3.11
+FROM alpine:3.12
 
 COPY --from=builder /var/www/html/ /mnt/
 COPY docker-build-root/ /

+ 1 - 0
roles/netbootxyz/vars/ubuntu.yml

@@ -11,6 +11,7 @@ netbootxyz_packages:
   - git
   - isolinux
   - liblzma-dev
+  - python3-apt
   - syslinux
   - syslinux-common
   - toilet