Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Build and deploy image using Semaphore (#3)
Browse files Browse the repository at this point in the history
Use Semaphore to build the image and push to Docker Hub. Replaces Docker Hub's Autobuild, which is becoming unavailable
on the free account tier.

Also add a label to the image that Snyk can use to monitor the repo.
  • Loading branch information
splynn authored Jun 18, 2021
1 parent b829b50 commit 6c633de
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# CI pipeline for building the countingup/kinesalite Docker image and pushing to Docker Hub
#
name: Build and deploy image
version: v1.0

agent:
machine:
type: e1-standard-2
os_image: ubuntu1804

blocks:
- name: Build and deploy image
task:
secrets:
- name: countingup-dockerhub
jobs:
- name: Build and deploy image
commands:
- checkout
- docker build -t countingup/kinesalite .
- echo "${DOCKERHUB_PASSWORD}" | docker login --username "${DOCKERHUB_USERNAME}" --password-stdin
- docker push countingup/kinesalite
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM node:12-alpine

LABEL org.opencontainers.image.source="https://github.com/Countingup/docker-kinesalite"

RUN addgroup kinesalite && adduser -H -D -G kinesalite kinesalite

# See https://github.com/npm/npm/issues/17851 for npm permissions issues when
Expand Down

0 comments on commit 6c633de

Please sign in to comment.