Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Story][Dockerfile Improvements] Reduce size and improve compatibility #1681

Closed
Tracked by #1646
p0mvn opened this issue Jun 6, 2022 · 1 comment
Closed
Tracked by #1646
Labels
T:build T:dev-UX T:story A story belongs to an epic

Comments

@p0mvn
Copy link
Member

p0mvn commented Jun 6, 2022

Background

As an Osmosis engineer, I would like images to be lightweight and compatible with any environment so that they work on any platform I happen to work on

Oftentimes, I find that our images and/or binaries might work on some OS/VM and not others. When my environment changes, I happen to spend the majority of my time debugging our Docker images instead of focusing on a task.

Task 4.1 - Allow Images to be Built as Non-root

The major bottleneck in this category is that our images are built as a root. This has caused me issues numerous times. For example, when we create files in a container mounted on a volume, these files cannot be removed from the host unless the host is root. While this is not an issue locally, it is troublesome in CI.

This issue was fixed earlier for our release scripts but it seems to be broken again. Our main image and any other image that creates files on a volume (a lot of them are in e2e tests) should have the ability to be built as non-root.

Task 4.2

RUN, COPY, and ADD directives add additional layers, contributing to bigger image size. We should minimize these.

For example, these RUNs could probably be on one line:

osmosis/Dockerfile

Lines 11 to 14 in d5cd033

RUN set -eux; apk add --no-cache ca-certificates build-base;
RUN apk add git
# Needed by github.com/zondax/hid
RUN apk add linux-headers

Resources

Status

@ValarDragon
Copy link
Member

Closed by #2876

Repository owner moved this from Blocked ❌ to Done ✅ in Osmosis Chain Development Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T:build T:dev-UX T:story A story belongs to an epic
Projects
Archived in project
Development

No branches or pull requests

2 participants