-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
50 lines (45 loc) · 1.16 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
FROM ubuntu:14.04
#
# Docker file used to build packages for .rpm and .deb
# based distributions.
# To propertly build package run in project directory:
#
# $ make build && make pack
# or
# $ make all
#
# For details refer to README.md file.
#
# Requires installed docker.
#
ENV GOPATH /golang
ENV DESCRIPTION 'AppCop - Marathon applications law enforcement'
ENV MAINTAINER "Allegro"
RUN apt-get update && apt-get install -y software-properties-common
RUN apt-add-repository -y ppa:brightbox/ruby-ng
RUN apt-get update && apt-get install -y \
python-software-properties \
build-essential ruby2.1 \
ruby-switch \
ruby2.1-dev \
rpm
RUN gem install fpm
ADD . /work
ENTRYPOINT cd /work && fpm -s dir -t deb \
--deb-upstart debian/appcop.upstart \
--deb-systemd debian/appcop.service \
-n appcop \
-v `cat ./VERSION` \
-m "$MAINTAINER" \
--description "$DESCRIPTION" \
build/appcop=/usr/bin/ \
&& mv *deb dist/ && \
fpm -s dir -t rpm \
-n appcop \
-v `cat ./VERSION` \
-m "$MAINTAINER" \
--description "$DESCRIPTION" \
build/appcop=/usr/bin/ \
debian/appcop.service=/etc/systemd/system/appcop.service \
debian/appcop.service=/etc/init/appcop.conf \
&& mv *rpm dist/