contrib: Don't declare OS variable in docker run command (Fixes: #413)

Since the containers are ephemeral just declare directly in the Dockerfile
This also simplifies the run command for users building fwupd
This commit is contained in:
Mario Limonciello 2018-02-21 09:48:30 -06:00 committed by Mario Limonciello
parent d838ae045f
commit a0f9f619ca
6 changed files with 7 additions and 1 deletions

View File

@ -17,4 +17,4 @@ install:
- ./contrib/ci/generate_docker.py
script:
- docker run -e OS=$OS -e CI=true -t -v `pwd`/dist:/build/dist fwupd-$OS
- docker run -e CI=true -t -v `pwd`/dist:/build/dist fwupd-$OS

View File

@ -1,4 +1,5 @@
FROM archlinux/base
%%%OS%%%
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN echo fubar > /etc/machine-id

View File

@ -1,4 +1,5 @@
FROM %%%ARCH_PREFIX%%%debian:testing
%%%OS%%%
RUN echo fubar > /etc/machine-id
%%%ARCH_SPECIFIC_COMMAND%%%
%%%INSTALL_DEPENDENCIES_COMMAND%%%

View File

@ -1,4 +1,5 @@
FROM fedora:26
%%%OS%%%
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

View File

@ -1,4 +1,5 @@
FROM ubuntu:devel
%%%OS%%%
RUN echo fubar > /etc/machine-id
%%%ARCH_SPECIFIC_COMMAND%%%
%%%INSTALL_DEPENDENCIES_COMMAND%%%

View File

@ -103,6 +103,8 @@ with open(out.name, 'w') as wfd:
wfd.write('RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list\n')
#add new architecture
wfd.write('RUN dpkg --add-architecture %s\n' % SUBOS)
elif line == "%%%OS%%%\n":
wfd.write("ENV OS %s\n" % TARGET)
else:
wfd.write(line)
wfd.flush()