This repository has been archived by the owner on Mar 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
55 lines (39 loc) · 1.49 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
## The goal of this machine is to build packages and expose them into DEB and RPM repositories
## Usage - build and expose packages:
## cd OBM_SOURCES_ROOT_DIRECTORY
## docker build --tag build-obm .
## docker run --name expose-packages --rm --publish 8888:80 build-obm
## Usage - APT configuration example
## deb http://HOST_RUNNING_DOCKER:8888/deb obm obm
## deb http://deb.obm.org/30/contrib wheezy obm
## Usage - YUM configuration example
## [obm-stable]
## name=obm-stable
## baseurl=http://HOST_RUNNING_DOCKER:8888/rpm
## enabled=1
## gpgcheck=0
FROM debian:7.3
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
python locales locales-all git \
devscripts ant ant-optional openjdk-7-jre-headless cdbs \
reprepro maven openjdk-7-jdk wget webfs rpm createrepo
RUN mkdir /root/build-{deb,el6} && \
mkdir -p /repo/deb/conf && \
mkdir -p /repo/rpm
## COPY OBM SOURCES
ADD . obm
## BUILD OBM PACKAGES
RUN cd obm/java/sync && \
mvn dependency:go-offline || true && \
mvn package -T1C
RUN cd obm/build-system && \
./build.py /root/build-deb --nocompile --osversion wheezy all && \
./build.py /root/build-el6 --nocompile --osversion el6 all
## BUILD DEB REPOSITORY
COPY docker-resources/distributions /repo/deb/conf/
RUN cd /repo/deb && find /root/build-deb -name \*.deb -exec reprepro -V includedeb obm {} \;
## BUILD RPM REPOSITORY
RUN cp /root/build-el6/*.rpm /repo/rpm/ ; createrepo /repo/rpm
EXPOSE 80
CMD webfsd -F -p 80 -r /repo/