Skip to content

Commit

Permalink
Publish docker image.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quving committed Apr 3, 2020
1 parent a398e77 commit 2e5977c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
image: docker:latest

variables:
DOCKER_DRIVER: overlay2

stages:
- build

variables:
TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
PROXY_HTTP: http://proxy.hoou.ovh:3128
PROXY_HTTPS: http://proxy.hoou.ovh:3128

build and publish:
stage: build
only:
- master
before_script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
script:
- docker build --build-arg http_proxy=$PROXY_HTTP --build-arg https_proxy=$PROXY_HTTPS -t $TAG .
- docker push $TAG
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.6

LABEL maintainer="[email protected]"

# Install deps
WORKDIR /app
ADD . .
RUN pip install -r requirements.txt

# Install kubectl
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl"
RUN chmod +x kubectl
RUN ln -s /kubectl /usr/bin/kubectl

WORKDIR /app
CMD ["echo", "not implemented yet"]

0 comments on commit 2e5977c

Please sign in to comment.