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 Containerfile #16

Merged
merged 5 commits into from
Dec 1, 2023
Merged

Add Containerfile #16

merged 5 commits into from
Dec 1, 2023

Conversation

bnour-corrae
Copy link
Collaborator

No description provided.

Dockerfile Outdated
Comment on lines 7 to 11
COPY .cargo .
COPY Cargo* ./
COPY src src/

RUN cargo build --release --locked --target=x86_64-unknown-linux-musl
Copy link
Owner

Choose a reason for hiding this comment

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

I think you can cache the dependencies with a trick

Copy Cargo* first, then create a dummy lib.rs file:

RUN mkdir -p src && touch src/lib.rs && cargo build --release --locked --target=x86_64-unknown-linux-musl

then copy src and run the build again.
For the CI it shouldn't matter, but for local testing it would probably speed up things considerably.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does help.

Changed in 33320ee

Comment on lines 22 to 27
docker-build:
name: Build the Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: docker build . --file Dockerfile --tag pod-director:$(date +%s)
Copy link
Owner

Choose a reason for hiding this comment

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

Question. Would we like to be petty and adopt the "Containerfile" and "container image" terms instead?

Ubuntu uses it in its documentation: https://manpages.ubuntu.com/manpages/jammy/en/man5/containers-dockerfile.5.html

I'll let you decide

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we would!

Although 'Dockerfile' is the industry standard, using a more generic name would be better.

Changed in 3368c8c

@Angelin01 Angelin01 changed the title Add Dockerfile Add Containerfile Dec 1, 2023
@Angelin01 Angelin01 merged commit f58079f into master Dec 1, 2023
2 checks passed
@Angelin01 Angelin01 deleted the dockerfile branch December 1, 2023 00:55
@Angelin01 Angelin01 mentioned this pull request Mar 18, 2024
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.

2 participants