Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Commit

Permalink
use baseimage
Browse files Browse the repository at this point in the history
  • Loading branch information
voidus committed Mar 15, 2014
1 parent b121aac commit 2e9819a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
15 changes: 3 additions & 12 deletions data/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
FROM dockerfile/java

RUN adduser youtrack --disabled-password --gecos ""

RUN mkdir -p /home/youtrack/data
RUN touch /home/youtrack/data/.keep

RUN chown -R youtrack: /home/youtrack/data

WORKDIR /home/youtrack

VOLUME /home/youtrack/data
FROM ubuntu:12.04
RUN mkdir /youtrack-data && touch /youtrack-data/.keep
VOLUME /youtrack-data

CMD echo "Pure data container"
26 changes: 21 additions & 5 deletions youtrack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
FROM dockerfile/java
FROM phusion/baseimage:0.9.8
MAINTAINER Simon Kohlmeyer <[email protected]>

RUN adduser youtrack --disabled-password --gecos ""
# Install Java
RUN apt-get install -y python-software-properties
RUN add-apt-repository -y ppa:webupd8team/java
RUN apt-get update
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
RUN apt-get install -y oracle-java7-installer

USER youtrack
# Install youtrack
WORKDIR /home/youtrack
RUN wget -nv http://download.jetbrains.com/charisma/youtrack-5.1.jar -O /youtrack.jar

RUN wget -nv http://download.jetbrains.com/charisma/youtrack-5.1.jar
ADD ./etc /etc
# Set all files root:root manually until https://github.com/dotcloud/docker/issues/3950 is fixed
RUN bash -c 'chown root: /etc/{,service/{,youtrack/{,run}}}'

CMD ["java", "-Duser.home=/home/youtrack/data", "-XX:MaxPermSize=150m", "-Xmx256m", "-jar", "youtrack-5.1.jar", "8000"]
ADD ./ssh_pubkey /tmp/ssh_pubkey
RUN cat /tmp/ssh_pubkey >> /root/.ssh/authorized_keys && rm -f /tmp/ssh_pubkey
RUN chmod 600 /root/.ssh/authorized_keys

EXPOSE 80

CMD ["/sbin/my_init"]
3 changes: 3 additions & 0 deletions youtrack/etc/service/youtrack/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cd /home/youtrack
java -Duser.home=/youtrack-data -XX:MaxPermSize=150m -Xmx256m -jar /youtrack.jar 80
Empty file added youtrack/ssh_pubkey
Empty file.

0 comments on commit 2e9819a

Please sign in to comment.