-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
58 lines (51 loc) · 1.75 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
54
55
56
57
58
############################################################
# A Dockerfile used to create a java-stix build container
# based on Ubunu.
#
# Copyright (c) 2015, The MITRE Corporation. All rights reserved.
# See LICENSE for complete terms.
#
# @author nemonik (Michael Joseph Walsh <[email protected]>)
#
# WHAT TO DO:
#
# If you have Docker installed, from the root of the project run
# the following to create a container image for this Dockerfile via:
#
# docker build -t stix/java-stix .
#
# Then create a container using the image you just created via:
#
# docker run -t -i stix/java-stix /bin/bash
#
# To retreive the jar archives from the running docker container use following
# from the command-line of your docker host, not the container:
#
# docker cp <container id>:/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-javadoc.jar .
# docker cp <container id>:/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT-sources.jar .
# docker cp <container id>:/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT.jar .
#
# If the containder ID is not obvious, but you can also retrieve it via:
#
# docker ps
#
# An example of retrieving the snapshot jar would be the following:
#
# ➜ /tmp docker cp 83ad9afb6096:/java-stix/build/libs/stix-1.2.0.2-SNAPSHOT.jar .
#
#
############################################################
# Set base image
FROM dockerbase/java7
# File Maintainer
MAINTAINER STIX Project, The MITRE Corporation
# Update the sources list
RUN apt-get -y update
# Clone java-stix repo at the current branch into the container
COPY . java-stix
# Open the java-stix project
WORKDIR java-stix
# Build unsigned jar archives in debug to /java-stix/build/libs
RUN ./gradlew -x signArchives -d
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*