Skip to content

Configure NGINX: Makefile & Dockerfile#102

Open
karinaantoniu wants to merge 2 commits into
unikraft:mainfrom
karinaantoniu:nginx-setup
Open

Configure NGINX: Makefile & Dockerfile#102
karinaantoniu wants to merge 2 commits into
unikraft:mainfrom
karinaantoniu:nginx-setup

Conversation

@karinaantoniu
Copy link
Copy Markdown

Added rootfs/Dockerfile and rootfsMakefile to automate the process of obtaining the NGINX executable. The Dockefile installs NGINX in an isolated environment, while the Makefile handles copying the binary and its dependencies back to the host machine. Created the rootfs/extracted_rootfs directory that contains everything that will be mounted as the filesystem in the unikernel (the binary, the config files and shared libraries). I also modified setup.sh to automatically clone and create symlinks for all the required Unikraft libraries and the Makefile to include the path to the sources.

@karinaantoniu karinaantoniu marked this pull request as ready for review May 9, 2026 09:14
@razvand razvand self-assigned this May 9, 2026
@razvand razvand self-requested a review May 9, 2026 09:26
@razvand razvand added the enhancement New feature or request label May 9, 2026
Copy link
Copy Markdown
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do NOT update the nginx/ directory. Add a new directory named bincompat-nginx/ with all the contents in it.

Do not add the root filesystem in the commit. The root filesystem will be generated by the user. Ignore it in the commit.

Use your proper name in the commit messages Karina Antoniu. Sign-off your commits. See the contributor guide. Read them 3-4 times. Look at the other commits in the repository and write the current commits similarly.

Add Makefile and setup.sh to configure NGINX via elfloader. Include Dockerfile and Makefile in rootfs/ to automate the extraction of the NGINX binary and its shared libraries.

Signed-off-by: Karina Antoniu <karina.antoniu@gmail.com>
Copy link
Copy Markdown
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not giving you this feedback earlier. Your approach is slightly incorrect. You need to do something similar to the bincompat-rust-hello app.

Namely:

  • There is no Makefile for the unikernel.
  • The instructions would point you to the kernel from ../elfloader-net/ that you would build in that directory ../elfloader-net/.
  • Add a README.md with instructions.
  • A setup.sh script is not really required. I think it's part of bincompat-rust-hello/ by mistake.

Comment thread bincompat-nginx/rootfs/Dockerfile Outdated
Comment on lines +8 to +9


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Use a single blank line. Otherwise, it appears that there's something special. Is there?

Comment thread bincompat-nginx/rootfs/Makefile Outdated
docker create --name temp-container $(DOCKER_IMAGE)
docker cp temp-container:/rootfs $(ROOTFS_DIR)
docker rm temp-container
docker rmi $(DOCKER_IMAGE)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
docker rmi $(DOCKER_IMAGE)

Do not remove image. It can stay part of the system.

- Remove local Makefile and setup.sh
- Update Dockerfile and rootfs Makefile

Signed-off-by: Karina Antoniu <karina.antoniu@gmail.com>
Copy link
Copy Markdown
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Squash your commits into a single one.

There are no instructions, no scripts and no README in the pull request. Follow the example of bincompat-c-hello: have a similar structure, check it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants