Task: Add docker from cubetiq docker image and replaced docker container
This commit is contained in:
parent
45ff40b618
commit
61958699cd
@ -1,6 +1,6 @@
|
||||
FROM docker:latest
|
||||
FROM cubetiq/calpine-docker:latest
|
||||
|
||||
RUN apk add bash
|
||||
RUN apk update
|
||||
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
#### Current working directory is: /github/workspace ####
|
||||
WORKDIR=$(pwd)
|
||||
echo "Workdir => ${WORKDIR}"
|
||||
echo "Working directory => $WORKDIR"
|
||||
|
||||
if [ ! -z $INPUT_USERNAME ];
|
||||
then echo $INPUT_PASSWORD | docker login $INPUT_REGISTRY -u $INPUT_USERNAME --password-stdin
|
||||
@ -15,7 +15,7 @@ then INPUT_OPTIONS="$INPUT_OPTIONS --network $INPUT_DOCKER_NETWORK"
|
||||
fi
|
||||
|
||||
if [ -z $INPUT_SHELL ];
|
||||
then INPUT_SHELL=sh
|
||||
then INPUT_SHELL=/bin/sh
|
||||
fi
|
||||
|
||||
if [ -z $INPUT_IMAGE ];
|
||||
@ -26,12 +26,4 @@ if [ -z $semicolon_delimited_script ];
|
||||
then semicolon_delimited_script="echo $(whoami)"
|
||||
fi
|
||||
|
||||
echo "My name is: $(whoami)"
|
||||
|
||||
echo "Start executing docker..."
|
||||
|
||||
mkdir hello
|
||||
|
||||
echo "Hello World" > hello/hello.txt
|
||||
|
||||
docker run --workdir /github/workspace -v "$(pwd)":"/github/workspace" -v "/var/run/docker.sock":"/var/run/docker.sock" --entrypoint=sh $INPUT_IMAGE -c "docker version; docker ps; pwd; ls; ls /"
|
||||
exec docker run --workdir $WORKDIR -v "$WORKDIR":"$WORKDIR" -v "/var/run/docker.sock":"/var/run/docker.sock" $INPUT_OPTIONS --entrypoint=$INPUT_SHELL $INPUT_IMAGE -c "`cat semicolon_delimited_script`"
|
Loading…
Reference in New Issue
Block a user