forked from eficode-academy/dayofdocker15
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the ubuntu slave, because Bo wants to use Ubuntu slave!
- Loading branch information
Muhammad Kamran Azeem
committed
Nov 30, 2015
1 parent
edc7dce
commit 0175007
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM ubuntu:14.04 | ||
|
||
|
||
# Exposes port 22 for incoming SSH connections. | ||
EXPOSE 22 | ||
|
||
## The following line is not needed on centos. It is needed on ubuntu. | ||
RUN mkdir /var/run/sshd | ||
|
||
|
||
RUN apt-get update && apt-get -y install openssh-server openjdk-7-jdk git wget tar build-essential golang | ||
|
||
|
||
## Setup SSH host keys, which are required for sshd to start properly. | ||
# RUN /usr/bin/ssh-keygen -q -t rsa1 -f /etc/ssh/ssh_host_key -C '' -N '' >&/dev/null | ||
# RUN /usr/bin/ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C '' -N '' >&/dev/null | ||
# RUN /usr/bin/ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -C '' -N '' >&/dev/null | ||
# RUN /usr/bin/ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -C '' -N '' >&/dev/null | ||
# RUN /usr/bin/ssh-keygen -q -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -C '' -N '' >&/dev/null | ||
|
||
# This is kinf of a hack. For DayofDocker Bosse wants to run docker commands. | ||
# The builduser logs in through ssh (not as root) so builduser needs to be a member of the group docker | ||
# The docker group on the Zetta host has the id 999. | ||
# When this user is created as following, it will already be a member of docker group. | ||
# I use 999 for a reason. If you decide to mount the groups file from the host, that will also have the same group id. | ||
|
||
RUN groupadd -g 999 docker | ||
RUN useradd -G 999 -m builduser \ | ||
&& echo "builduser:dayofdocker" | /usr/sbin/chpasswd | ||
|
||
COPY dotgitconfig /home/builduser/.gitconfig | ||
|
||
|
||
# Allow root to login | ||
# RUN sed -i "s/PermitRootLogin without-password/PermitRootLogin yes/g" /etc/ssh/sshd_config | ||
|
||
############################################################################ | ||
# build it with: | ||
# sudo docker build --rm -t dod/ubuntu-slave . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[user] | ||
name = builduser | ||
email = [email protected] | ||
# Note: Using the "cache" helper is not feasible as it fogets the credentials after few minutes. | ||
# The "store" helper keeps the credentials in ~/.git-credentials forever - in plain text. | ||
[credential] | ||
helper = store | ||
|
||
|