]> git.ipfire.org Git - ipfire.org.git/commitdiff
Add docker container for testing
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 2 Dec 2018 15:32:18 +0000 (15:32 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 2 Dec 2018 15:32:18 +0000 (15:32 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Dockerfile [new file with mode: 0644]
Makefile.am

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..c59ddb0
--- /dev/null
@@ -0,0 +1,43 @@
+FROM centos:latest
+
+EXPOSE 80
+
+# Enable EPEL
+RUN yum install -y epel-release
+
+# Install all updates
+RUN yum update -y
+
+# Install required packages
+RUN yum install -y \
+       autoconf \
+       automake \
+       curl-devel \
+       gcc \
+       make \
+       openldap-devel \
+       python34 \
+       python34-devel \
+       python34-pip \
+       sassc \
+       \
+       /usr/share/hwdata/pci.ids \
+       /usr/share/hwdata/usb.ids
+
+# Install Python packages
+ADD requirements.txt .
+RUN pip3 install -r requirements.txt
+
+# Copy code into the container
+COPY . /build/ipfire.org
+WORKDIR /build/ipfire.org
+
+# Install the webapp
+RUN ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc \
+       && make -j4 && make install
+
+# Go back to /root
+WORKDIR /root
+
+# Run the webapp
+CMD ["ipfire.org-webapp", "--debug", "--logging=debug", "--port=80"]
index 3e5a059bc5d40270fde39daaca2b31d9ae3d46e9..b00350b7f3a99798e230762c5a86d2dfc4f1e5b3 100644 (file)
@@ -975,3 +975,8 @@ SED_PROCESS = \
 src/scss/main.css: $(SCSS_FILES) Makefile
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
                $(SASSC) --style compressed $< > $@
+
+# Docker
+.PHONY: docker
+docker: Dockerfile
+       docker build -t "ipfire/webapp:$(PACKAGE_VERSION)" .