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

Add Dockerfile.alpine for alpine buil; add tini to debian image #22

Merged
merged 1 commit into from
May 3, 2022
Merged

Conversation

brtwrst
Copy link
Contributor

@brtwrst brtwrst commented May 1, 2022

This PR adds a separate Dockerfile.alpine to build an image based on Alpine Linux.
The resulting image will be just over 100M in size.
The build and resulting image works on AMD64 (Tested on Ubuntu 20.04) and ARM64 (Tested on a RPI3 with Ubuntu 22.04)

During testing i switched between the yarn start and node app.js start commands and when using the latter, the container will exit with code 143 (which i think is the correct code) as opposed to exit code 1 when using yarn start.
So i included the node app.js command for now.

@brtwrst brtwrst changed the title Add Dockerfile.alpine for alpine build Add Dockerfile.alpine for alpine buil; add tini to debian image May 2, 2022
@brtwrst
Copy link
Contributor Author

brtwrst commented May 2, 2022

Based upon the discussion in #14 i have added tini to both dockerfiles.

@brtwrst
Copy link
Contributor Author

brtwrst commented May 2, 2022

I have tested both dockerfiles locally. Final sizes are 235M for the debian based image and 102M for the alpine one.
You can tell docker to use the alpine image either with a docker-compose.yml file or by buiding the image with

docker build -f Dockerfile.alpine .

@hasanhakkaev
Copy link

LGTM! Thanks!

@jlongster
Copy link
Contributor

Awesome, thanks for coming to solution!

@jlongster
Copy link
Contributor

Oh shoot there's a conflict.

@brtwrst mind fixing?

@brtwrst
Copy link
Contributor Author

brtwrst commented May 3, 2022

Yes this happened because #14 was merged. Which changes the Dockerfile to build the alpine based image (and does not work on ARM64.) . I am confused now.

What should i provide now?

  • A Dockerfile that builds the alpine image and a Dockerfile.bullseye that builds the debian image?
  • Or a Dockerfile that builds the debian image and a Dockerfile.alpine that builds the alpine image?

@brtwrst brtwrst closed this May 3, 2022
@brtwrst
Copy link
Contributor Author

brtwrst commented May 3, 2022

I have recreated the originally proposed configuration.

  • A Dockerfile that builds the debian image and a Dockerfile.alpine that builds the alpine image

@brtwrst brtwrst reopened this May 3, 2022
@hasanhakkaev
Copy link

The idea looks good to me. There is a go to image which is debian based , and for those who want alpine based there is one too. Thank you @brtwrst for the effort.

@brtwrst brtwrst removed their assignment May 3, 2022
@jlongster jlongster merged commit 6be206f into actualbudget:master May 3, 2022
@jlongster
Copy link
Contributor

Thanks for the work @brtwrst! I ended up reverting the other PR and then reverting that revert because I didn't see you had based your changed on it. That let me merge your changes in.

Can you double-check on that docker files look correct?

@brtwrst
Copy link
Contributor Author

brtwrst commented May 3, 2022

They are correct, thanks for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants