Skip to content

Commit

Permalink
feat: update Dockerfile
Browse files Browse the repository at this point in the history
- Update shipit to 0.4.0 close #1
- Install gomplate to allow build shipit config from template
- Update gitlab ci pipeline
- Add build.sh script for building image while develop
  • Loading branch information
hustlahusky committed May 4, 2020
1 parent 2a515e5 commit c0d5ac8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
20 changes: 12 additions & 8 deletions .gitlab-ci.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
image: docker:latest
stages:
- build

services:
- docker:dind

.build: &build
stage: build
.build:
image: docker:latest
services:
- docker:dind
tags:
- docker
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
Expand All @@ -13,14 +15,16 @@ services:
- docker push "$CI_REGISTRY_IMAGE:$DOCKER_IMAGE_TAG"

build-master:
<<: *build
extends: .build
stage: build
variables:
DOCKER_IMAGE_TAG: latest
only:
- master

build-tags:
<<: *build
extends: .build
stage: build
variables:
DOCKER_IMAGE_TAG: $CI_COMMIT_REF_NAME
only:
Expand Down
19 changes: 12 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM alpine:3.10
RUN apk add --no-cache \
FROM alpine:3.11

LABEL maintainer="Constantine Karnaukhov <genteelknight@gmail.com>"

ENV SHIPIT_VERSION="0.4.0"

RUN set -x \
&& apk add --no-cache \
bash \
openssh-client \
libcurl \
curl \
ncurses
RUN SHPT=/usr/local/bin/shipit && \
curl -o $SHPT https://raw.githubusercontent.com/sapegin/shipit/master/bin/shipit && \
chmod +x $SHPT && \
unset SHPT
ncurses \
gomplate \
&& curl -o /usr/local/bin/shipit https://raw.githubusercontent.com/sapegin/shipit/${SHIPIT_VERSION}/bin/shipit \
&& chmod +x /usr/local/bin/shipit
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
docker build -t spaceonfire/shipit:edge .

0 comments on commit c0d5ac8

Please sign in to comment.