Commit faae8e78 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Merge branch 'add-lfs-ubuntu-docker' into 'master'

add lfs support to ubuntu docker runner

See merge request gitlab-org/gitlab-runner!1192
parents 7f4421fe c586432f
......@@ -428,6 +428,9 @@ package-rpm: *packages
PUSH_TO_DOCKER_HUB: "true"
DOCKER_MACHINE_CHECKSUM: "a4c69bffb78d3cfe103b89dae61c3ea11cc2d1a91c4ff86e630c9ae88244db02"
DUMB_INIT_CHECKSUM: "a8defac40aaca2ca0896c7c5adbc241af60c7c3df470c1a4c469a860bd805429"
GIT_LFS_VERSION: "2.7.1"
GIT_LFS_CHECKSUM: "c8952ee72af214e3669f834d829e8a0a3becd160dead18237f99e40d75a3e920"
script:
- source ci/touch_make_dependencies
- make release_docker_images
......
......@@ -28,6 +28,7 @@ build() {
--no-cache \
--build-arg DOCKER_MACHINE_VERSION="${DOCKER_MACHINE_VERSION}" \
--build-arg DUMB_INIT_VERSION="${DUMB_INIT_VERSION}" \
--build-arg GIT_LFS_VERSION="${GIT_LFS_VERSION}" \
-t "${1}" \
"${2}"
}
......@@ -91,8 +92,9 @@ logout() {
_docker logout "${1}"
}
echo "${DOCKER_MACHINE_CHECKSUM} /usr/bin/docker-machine" >> dockerfiles/checksums
echo "${DOCKER_MACHINE_CHECKSUM} /usr/bin/docker-machine" > dockerfiles/checksums
echo "${DUMB_INIT_CHECKSUM} /usr/bin/dumb-init" >> dockerfiles/checksums
echo "${GIT_LFS_CHECKSUM} /usr/bin/git-lfs" >> dockerfiles/checksums
cat dockerfiles/checksums
cp out/deb/gitlab-runner_amd64.deb dockerfiles/ubuntu/
......
......@@ -12,6 +12,7 @@ RUN apk add --no-cache \
ARG DOCKER_MACHINE_VERSION
ARG DUMB_INIT_VERSION
ARG GIT_LFS_VERSION
COPY gitlab-runner-linux-amd64 /usr/bin/gitlab-runner
COPY checksums /tmp/
......@@ -20,12 +21,19 @@ RUN chmod +x /usr/bin/gitlab-runner && \
gitlab-runner --version && \
mkdir -p /etc/gitlab-runner/certs && \
chmod -R 700 /etc/gitlab-runner && \
wget -q https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine-Linux-x86_64 -O /usr/bin/docker-machine && \
wget -nv https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine-Linux-x86_64 -O /usr/bin/docker-machine && \
chmod +x /usr/bin/docker-machine && \
docker-machine --version && \
wget -q https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64 -O /usr/bin/dumb-init && \
wget -nv https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64 -O /usr/bin/dumb-init && \
chmod +x /usr/bin/dumb-init && \
dumb-init --version && \
wget -nv https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-amd64-v${GIT_LFS_VERSION}.tar.gz -O /tmp/git-lfs.tar.gz && \
mkdir /tmp/git-lfs && \
tar -xzf /tmp/git-lfs.tar.gz -C /tmp/git-lfs/ && \
mv /tmp/git-lfs/git-lfs /usr/bin/git-lfs && \
rm -rf /tmp/git-lfs* && \
git-lfs install --skip-repo && \
git-lfs version && \
sha256sum -c -w /tmp/checksums
COPY entrypoint /
......
......@@ -2,11 +2,12 @@ FROM ubuntu:16.04
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y ca-certificates wget apt-transport-https vim nano tzdata && \
apt-get install -y ca-certificates wget apt-transport-https vim nano tzdata git curl && \
rm -rf /var/lib/apt/lists/*
ARG DOCKER_MACHINE_VERSION
ARG DUMB_INIT_VERSION
ARG GIT_LFS_VERSION
COPY gitlab-runner_amd64.deb /tmp/
COPY checksums /tmp/
......@@ -18,12 +19,19 @@ RUN dpkg -i /tmp/gitlab-runner_amd64.deb; \
gitlab-runner --version && \
mkdir -p /etc/gitlab-runner/certs && \
chmod -R 700 /etc/gitlab-runner && \
wget -q https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine-Linux-x86_64 -O /usr/bin/docker-machine && \
wget -nv https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine-Linux-x86_64 -O /usr/bin/docker-machine && \
chmod +x /usr/bin/docker-machine && \
docker-machine --version && \
wget -q https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64 -O /usr/bin/dumb-init && \
wget -nv https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64 -O /usr/bin/dumb-init && \
chmod +x /usr/bin/dumb-init && \
dumb-init --version && \
wget -nv https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-amd64-v${GIT_LFS_VERSION}.tar.gz -O /tmp/git-lfs.tar.gz && \
mkdir /tmp/git-lfs && \
tar -xzf /tmp/git-lfs.tar.gz -C /tmp/git-lfs/ && \
mv /tmp/git-lfs/git-lfs /usr/bin/git-lfs && \
rm -rf /tmp/git-lfs* && \
git-lfs install --skip-repo && \
git-lfs version && \
sha256sum --check --strict /tmp/checksums
COPY entrypoint /
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment