[PR #278] [CLOSED] CI/CD and Dockerfile updates #556

Closed
opened 2026-02-25 23:34:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/278
Author: @n8225
Created: 10/4/2020
Status: Closed

Base: masterHead: ci_cd_docker_updates


📝 Commits (4)

  • febf4cb Add releases, docker images from scratch.
  • 30a6d4d dont run shiori as root in docker
  • a90f87e Update release.yml
  • d24d527 Update continuous-integration.yml

📊 Changes

4 files changed (+242 additions, -14 deletions)

View changed files

.dockerignore (+7 -0)
📝 .github/workflows/continuous-integration.yml (+82 -10)
.github/workflows/release.yml (+138 -0)
📝 Dockerfile (+15 -4)

📄 Description

  • Dockerfile changes

    • Added .dockerignore so unneded files aren't copied over
    • Smaller docker image using scratch image
    • Binaries are statically linked and build with cgo so that they can run on a scratch image.
    • docker image does run as root (could be a security issue) this could be easily changed but may also be harder to setup for some
  • Releases

    • When a tag is created github actions will create a release and upload binaries.
    • Binaries for linux and windows are statically linked and built with cgo, so they should have no dependencies.
    • Built with -extldflags -s -w flags for a smaller binary this strips dwarf tables used in debuggers and doesn't affect stack traces.
      • Release Targets:
        • linux-amd64 (tested)
        • linux-arm64 (untested)
        • linux-armv7 (untested)
        • win-amd64 (tested)
        • darwin-amd64 (untested)
    • Docker files will be created and uploaded to docker hub.
    • Tagged latest and with tag
      • linux-amd64 (tested)
      • linux-arm64 (untested)
      • linux-armv7 (untested)
  • Continous Integration

    • uses v1.x for latest version of golang
    • added go vet in linting stage
    • go build is run for all release targets as well(maintainers will have access to build artifacts).
    • added docker build and upload to docker hub for push to master, images tagged with commit sha1.
  • A go-shiori account will need to be made on docker hub

  • A personal access token will need to be created on docker hub

  • The following gihub actions secrets will need to be set in github

    • DOCKER_HUB_USERNAME
    • DOCKER_HUB_ACCESS_TOKEN

-Examples:
https://github.com/n8225/shiori/actions
https://github.com/n8225/shiori/releases
https://hub.docker.com/r/nrew225/shiori

Related Issues: #263 #260

Closes #254 #267 #238 #273


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/278 **Author:** [@n8225](https://github.com/n8225) **Created:** 10/4/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `ci_cd_docker_updates` --- ### 📝 Commits (4) - [`febf4cb`](https://github.com/go-shiori/shiori/commit/febf4cb6c6758c7b9b876b901b0e2a5c56903045) Add releases, docker images from scratch. - [`30a6d4d`](https://github.com/go-shiori/shiori/commit/30a6d4d611e318822e125aee8c02ab11d9efa39e) dont run shiori as root in docker - [`a90f87e`](https://github.com/go-shiori/shiori/commit/a90f87eeaec0da7bab46c855ff2b1d7fc2569ffb) Update release.yml - [`d24d527`](https://github.com/go-shiori/shiori/commit/d24d527b2f3ed71495a6032d4f5ef2a1d4082d52) Update continuous-integration.yml ### 📊 Changes **4 files changed** (+242 additions, -14 deletions) <details> <summary>View changed files</summary> ➕ `.dockerignore` (+7 -0) 📝 `.github/workflows/continuous-integration.yml` (+82 -10) ➕ `.github/workflows/release.yml` (+138 -0) 📝 `Dockerfile` (+15 -4) </details> ### 📄 Description - Dockerfile changes - Added .dockerignore so unneded files aren't copied over - Smaller docker image using scratch image - Binaries are statically linked and build with cgo so that they can run on a scratch image. - docker image does run as root (could be a security issue) this could be easily changed but may also be harder to setup for some - Releases - When a tag is created github actions will create a release and upload binaries. - Binaries for linux and windows are statically linked and built with cgo, so they should have no dependencies. - Built with `-extldflags -s -w` flags for a smaller binary this strips dwarf tables used in debuggers and doesn't affect stack traces. - Release Targets: - linux-amd64 (tested) - linux-arm64 (untested) - linux-armv7 (untested) - win-amd64 (tested) - darwin-amd64 (untested) - Docker files will be created and uploaded to docker hub. - Tagged latest and with tag - linux-amd64 (tested) - linux-arm64 (untested) - linux-armv7 (untested) - Continous Integration - uses v1.x for latest version of golang - added go vet in linting stage - go build is run for all release targets as well(maintainers will have access to build artifacts). - added docker build and upload to docker hub for push to master, images tagged with commit sha1. - A go-shiori account will need to be made on docker hub - A personal access token will need to be created on docker hub - The following gihub actions secrets will need to be set in github - DOCKER_HUB_USERNAME - DOCKER_HUB_ACCESS_TOKEN -Examples: https://github.com/n8225/shiori/actions https://github.com/n8225/shiori/releases https://hub.docker.com/r/nrew225/shiori Related Issues: #263 #260 Closes #254 #267 #238 #273 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:34:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#556
No description provided.