1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/.github
Gastón Fournier 4599e5cc06
chore: Optimize docker build oss (#3951)
## About the changes
Reduce the build time of OSS docker image from
[~30m](https://github.com/Unleash/unleash/actions/workflows/docker_publish.yaml)
to [under
15m](https://github.com/Unleash/unleash/actions/runs/5222180536/jobs/9427342758)

1. Build frontend outside docker multiplatform.
2. Allow `frontend/build` to be copied to the image by removing this
from `.dockerignore`
3. Run with `--ignore-scripts` to avoid building the frontend on the
`prepare` script, but this requires us to run all the prepare scripts
manually (except the frontend build).
 
**Note:** we need to build frontend in the `prepare` script to be able
to have source code dependencies

## Manual Testing
Manually downloaded from
https://hub.docker.com/r/unleashorg/unleash-server/tags?page=1 and
compared both `unleash` folders from main and the version built with the
new process
https://github.com/Unleash/unleash/actions/runs/5223078089/jobs/9429430190#step:5:48

![Screenshot from 2023-06-10
21-11-33](https://github.com/Unleash/unleash/assets/455064/60a41739-904d-480d-8d80-bf17b7a70432)

No major difference was spotted (only expected changes due to
development done in main)

**Command used to extract the contents:** 

```
cd /tmp
mkdir main && cd main
docker pull unleashorg/unleash-server:main-edge-18-alpine
docker export $(docker create unleashorg/unleash-server:main-edge-18-alpine) > container.tar && tar xvf container.tar
mkdir ../new-process && cd ../new-process
docker pull unleashorg/unleash-server:sha-ccac902-18-alpine
docker export $(docker create unleashorg/unleash-server:sha-ccac902-18-alpine) > container.tar && tar xvf container.tar
meld ./unleash ../main/unleash
```
2023-06-12 09:15:09 +02:00
..
ext-logos chore: update readme 2021-06-13 23:26:20 +02:00
workflows chore: Optimize docker build oss (#3951) 2023-06-12 09:15:09 +02:00
dashboard.png docs: Readme update dashboard screenshot (#953) 2021-09-23 21:19:10 +02:00
deploy-digital.svg chore: Added Deploy To Digital Ocean Button (#874) 2021-06-21 14:15:33 +02:00
deploy-heroku-20.png fix: styles to docs 2021-06-05 00:25:35 +02:00
FUNDING.yml
github_header_opaque_landscape.svg fix: add missing header image 2022-04-07 15:40:43 +02:00
github_online_demo.svg readme: Update online demo image (#2528) 2022-11-24 13:35:23 +00:00
github_unleash_users.svg fix: Add unleash users image 2022-04-08 13:19:24 +02:00
Logo_DarkBlue_Transparent_Portrait.png fix: update README.md 2021-06-04 19:31:28 +02:00
Logo_DarkBlue_Transparent_Portrait.svg fix: update README.md 2021-06-04 19:35:43 +02:00
logo.png fix: proper logo 2021-06-04 23:26:40 +02:00
stale.yml Meta: use org-wide stale bot config (#1789) 2022-07-05 15:59:11 +02:00
Unleash_architecture.svg docs: improve introduction section 2021-06-14 21:48:19 +02:00
unleash-logo.svg Add unleash logo to README (#859) 2021-05-27 23:36:59 +02:00