bitshares / bitshares/bitshares-core

Docker base image issues

Open
#2,741 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.2k
Forks
660
Avg merge
8h 17m
Merged PRs (30d)
26

Description

**Description**

As of writing, we use [phusion/baseimage:focal-1.2.0](https://registry.hub.docker.com/r/phusion/baseimage/) ([code](https://github.com/phusion/baseimage-docker)) as the base image of our Docker image.

Issues:
* The `phusion/baseimage:focal-1.2.0` Docker image on Docker Hub was pushed a year ago and has not been updated since. There are new `jammy-*` images, but so far we do not support Ubuntu Jammy. Although we do `apt-get upgrade` when building and running our own images, these commands bloat the image. Ideally the base image should be updated regularly when there are updates to its own base image or packages, even if there are no code changes in itself (also see https://github.com/bitshares/bitshares-core/issues/2667).
* The `phusion` base image comes preinstalled with some utilities and services that we don't really need, which bloat the image and potentially introduce vulnerabilities. We can do `apt-get remove` when building our own images, but this will not reduce our image size.

Nevertheless, we don't want to simply change our base image to `ubuntu:20.04`, because the `phusion` base image does have a lot of good stuff.

Potential solutions:
* Ask the maintainers of `phusion/baseimage` to regularly update the images on Docker Hub.
* Fork `phusion/baseimage` and maintain our own base image (both code and image). For example, take a look at https://github.com/phusion/baseimage-docker/compare/master...HydroMoon:laravel-baseimage:master, https://github.com/cyledge/baseimage-docker and https://github.com/phusion/baseimage-docker/network.
* Port the code in `phusion/baseimage` into our repository directly (and maintain it), so that we can change our base image to `ubuntu:20.04`.

**Impacts**
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.
- [ ] API (the application programming interface)
- [x] Build (the build process or something prior to compiled code)
- [ ] CLI (the command line wallet)
- [x] Deployment (the deployment process after building such as Docker, Travis, etc.)
- [ ] DEX (the Decentralized EXchange, market engine, etc.)
- [ ] P2P (the peer-to-peer network for transaction/block propagation)
- [ ] Performance (system or user efficiency, etc.)
- [ ] Protocol (the blockchain logic, consensus, validation, etc.)
- [x] Security (the security of system or user data, etc.)
- [ ] UX (the User Experience)
- [ ] Other (please add below)

## CORE TEAM TASK LIST
- [ ] Evaluate / Prioritize Bug Report
- [ ] Refine User Stories / Requirements
- [ ] Define Test Cases
- [ ] Design / Develop Solution
- [ ] Perform QA/Testing
- [ ] Update Documentation

Contributor guide

No contributing guide indexed for this repository

Research direction

No specific file is named; start by locating the repository's Docker build configuration and the phusion/baseimage:focal-1.2.0 reference. Compare the proposed base-image maintenance options, then verify that the selected approach produces a reproducible image and addresses the stated size and update concerns.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, ubuntu
Domain
build-system, devops, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.