Merge pull request #90 from chipkent/abstract_base_image

Allow users to choose the base image
This commit is contained in:
DoroWu 2018-11-27 13:07:08 +08:00 committed by GitHub
commit 1a89dce557
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -1,9 +1,11 @@
################################################################################
# base system
################################################################################
FROM ubuntu:18.04 as system
ARG image
FROM $image as system
ARG localbuild
RUN echo "LOCALBUILD=$localbuild"
RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; fi
# && add-apt-repository ppa:fcwu-tw/apps x11vnc
@ -26,7 +28,7 @@ RUN apt-get update \
# Additional packages require ~600MB
# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw
# tini for subreap
# tini for subreap
ARG TINI_VERSION=v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini
RUN chmod +x /bin/tini

View file

@ -2,9 +2,11 @@
REPO ?= dorowu/ubuntu-desktop-lxde-vnc
TAG ?= latest
IMAGE ?= ubuntu:18.04
LOCALBUILD ?= 1
build:
docker build -t $(REPO):$(TAG) --build-arg localbuild=1 .
docker build -t $(REPO):$(TAG) --build-arg localbuild=$(LOCALBUILD) --build-arg image=$(IMAGE) .
run:
docker run --rm \