mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-04-25 13:15:39 +02:00
updates
Signed-off-by: Jess Frazelle <jess@mesosphere.com>
This commit is contained in:
parent
455b5ca9e0
commit
3dc19702e0
@ -1,18 +1,19 @@
|
|||||||
FROM java:8-alpine
|
FROM java:8-alpine
|
||||||
MAINTAINER Jessica Frazelle <jess@docker.com>
|
MAINTAINER Jessica Frazelle <jess@docker.com>
|
||||||
|
|
||||||
RUN apk --update add \
|
# install buck
|
||||||
|
RUN buildDeps=' \
|
||||||
apache-ant \
|
apache-ant \
|
||||||
bash \
|
bash \
|
||||||
git \
|
git \
|
||||||
perl \
|
perl \
|
||||||
python \
|
python \
|
||||||
zip \
|
zip \
|
||||||
|
' \
|
||||||
|
set -x \
|
||||||
|
&& apk --update add $buildDeps \
|
||||||
--update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
|
--update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& git clone --depth 1 https://github.com/facebook/buck.git /buck \
|
||||||
|
|
||||||
# install buck
|
|
||||||
RUN git clone --depth 1 https://github.com/facebook/buck.git /buck \
|
|
||||||
&& ( \
|
&& ( \
|
||||||
cd /buck \
|
cd /buck \
|
||||||
&& ant \
|
&& ant \
|
||||||
@ -23,12 +24,12 @@ RUN git clone --depth 1 https://github.com/facebook/buck.git /buck \
|
|||||||
cd /gitiles \
|
cd /gitiles \
|
||||||
&& touch .nobuckcheck \
|
&& touch .nobuckcheck \
|
||||||
&& git submodule update --init \
|
&& git submodule update --init \
|
||||||
&& buck build all \
|
&& buck build gitiles-dev:dev \
|
||||||
&& mv buck-out/gen/gitiles/gitiles.war /gitiles.war \
|
|
||||||
) \
|
) \
|
||||||
&& rm -rf /gitiles \
|
&& apk del $buildDeps \
|
||||||
&& rm -rf /buck
|
&& rm -rf /buck \
|
||||||
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY ./start.sh /start.sh
|
COPY start.sh /start.sh
|
||||||
|
|
||||||
ENTRYPOINT [ "/start.sh" ]
|
ENTRYPOINT [ "/start.sh" ]
|
||||||
|
@ -1,12 +1,28 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
ROOT="/gitiles"
|
ROOT=/gitiles
|
||||||
PROPERTIES=
|
PROPERTIES=
|
||||||
|
|
||||||
if [ "x$1" != "x" ]; then
|
if [ "x$1" != "x" ]; then
|
||||||
PROPERTIES="-Dcom.google.gitiles.configPath=$1"
|
PROPERTIES="-Dcom.google.gitiles.configPath=$1"
|
||||||
|
else
|
||||||
|
PROPERTIES="-Dcom.google.gitiles.configPath=/gitfiles.config"
|
||||||
|
cat > /gitfiles.config <<-EOF
|
||||||
|
[gitiles]
|
||||||
|
# Repositories placed here
|
||||||
|
basePath = /home/git
|
||||||
|
# Do not check they are exported
|
||||||
|
exportAll = true
|
||||||
|
# This URL will be displayed as clone URL. DO NOT FORGET TRAILING SLASH!
|
||||||
|
baseGitUrl = git@g.j3ss.co:
|
||||||
|
# Title of site (doh)
|
||||||
|
siteTitle = Gitiles - git.j3ss.co
|
||||||
|
# I dunno why, but it is have to be configured.
|
||||||
|
canonicalHostName = git.j3ss.co
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PROPERTIES="$PROPERTIES -Dcom.google.gitiles.sourcePath=$ROOT"
|
PROPERTIES="$PROPERTIES -Dcom.google.gitiles.sourcePath=$ROOT"
|
||||||
|
|
||||||
exec java $PROPERTIES -jar "$ROOT/buck-out/gen/gitiles/gitiles.war"
|
exec java $PROPERTIES -jar "$ROOT/buck-out/gen/gitiles-dev/dev.jar"
|
||||||
|
@ -28,7 +28,7 @@ RUN apk update && apk add \
|
|||||||
echo 'git init --bare $1'; \
|
echo 'git init --bare $1'; \
|
||||||
echo 'chown -R git:git $1'; \
|
echo 'chown -R git:git $1'; \
|
||||||
echo '}'; \
|
echo '}'; \
|
||||||
} > /home/git/.bashrc
|
} > /etc/profile
|
||||||
|
|
||||||
ENV HOME /home/git
|
ENV HOME /home/git
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
|
@ -11,8 +11,13 @@ if [ ! -f "${HOSTKEY}" ]; then
|
|||||||
ssh-keygen -A
|
ssh-keygen -A
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p ${HOME}/.ssh
|
||||||
|
source /etc/profile
|
||||||
[ "$PUBKEY" ] && echo "$PUBKEY" > ${HOME}/.ssh/authorized_keys
|
[ "$PUBKEY" ] && echo "$PUBKEY" > ${HOME}/.ssh/authorized_keys
|
||||||
|
|
||||||
|
chown -R git:git ${HOME}
|
||||||
|
chmod -R 755 ${HOME}
|
||||||
|
|
||||||
# Fix permissions, if writable
|
# Fix permissions, if writable
|
||||||
if [ -w ${HOME}/.ssh ]; then
|
if [ -w ${HOME}/.ssh ]; then
|
||||||
chown git:git ${HOME}/.ssh && chmod 700 ${HOME}/.ssh/
|
chown git:git ${HOME}/.ssh && chmod 700 ${HOME}/.ssh/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user