Create docker image

This commit is contained in:
Deon George 2017-11-27 00:06:30 +11:00
parent 4152786d65
commit da6b7accbb
2 changed files with 53 additions and 8 deletions

View File

@ -1,15 +1,19 @@
services:
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
stages:
- build
- test
- docker
# Compile on CentOS 6.x, for some reason compiling on CentOS 7.x results in buffer corruption
# For some reason compiling on CentOS 6.x results in buffer corruption
build:6-7.1:
stage: build
image: leenooks/ci-tsm:6-7.1
script:
- make -f Makefile.linux64
only:
- master
- c6
tags:
- C
artifacts:
@ -25,14 +29,14 @@ test:6-7.1:
script:
- cd test && ./test.sh
only:
- master
- c6
tags:
- C
# Compile on CentOS 6.x, for some reason compiling on CentOS 7.x results in buffer corruption
build:7-7.1:
build:7-8.1:
stage: build
image: leenooks/ci-tsm:7-7.1
image: leenooks/ci-tsm:7-8.1
script:
- make -f Makefile.linux64
only:
@ -44,14 +48,37 @@ build:7-7.1:
paths:
- tsmpipe
test:7-7.1:
test:7-8.1:
stage: test
image: leenooks/ci-tsm:7-7.1
image: leenooks/ci-tsm:7-8.1
dependencies:
- build:7-7.1
- build:7-8.1
script:
- cd test && ./test.sh
only:
- master
tags:
- C
docker:7-8.1:
stage: docker
image: docker:latest
before_script:
- docker info
- docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
variables:
VERSION: 8.1.0
DOCKER_IMAGE: deon/tsmpipe
DOCKER_REGISTRY: registry.leenooks.net
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
dependencies:
- test:7-8.1
script:
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
- docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
tags:
- docker
only:
- master

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
# NAME deon/tsmpipe
# VERSION 8.1.0
FROM centos:7
#RUN curl -SL ftp://public.dhe.ibm.com/storage/tivoli-storage-management/maintenance/client/v8r1/Linux/LinuxX86/BA/v812/8.1.2.0-TIV-TSMBAC-LinuxX86.tar | tar -C /tmp/ -xf - gskcrypt64-8.0.50.78.linux.x86_64.rpm gskssl64-8.0.50.78.linux.x86_64.rpm TIVsm-API64.x86_64.rpm && yum install -y /tmp/*rpm && rm -f /tmp/*rpm
RUN curl -SL http://yum.leenooks.net/CentOS/7/8.1.2.0-TIV-TSMBAC-LinuxX86.tar | tar -C /tmp/ -xf - gskcrypt64-8.0.50.78.linux.x86_64.rpm gskssl64-8.0.50.78.linux.x86_64.rpm TIVsm-API64.x86_64.rpm && yum install -y /tmp/*rpm && rm -f /tmp/*rpm
RUN ln -s /tsm/dsm.sys /opt/tivoli/tsm/client/api/bin64/ \
&& ln -s /tsm/dsm.opt /opt/tivoli/tsm/client/api/bin64/ \
&& ln -s /tsm/dsmcert.kdb /opt/tivoli/tsm/client/api/bin64/ \
&& ln -s /tsm/dsmcert.sth /opt/tivoli/tsm/client/api/bin64/
COPY tsmpipe/tsmpipe /usr/bin
VOLUME [ "/tsm" ]
# Starting
ENTRYPOINT [ "/usr/bin/tsmpipe" ]
RUN rpm -qa|sort