Skip to content

minimalish docker image#512

Open
danbornside wants to merge 12 commits into
developfrom
db-docker-support
Open

minimalish docker image#512
danbornside wants to merge 12 commits into
developfrom
db-docker-support

Conversation

@danbornside
Copy link
Copy Markdown
Contributor

minimalish docker image building.

export NAME=projectName
export VERSION=$(git rev-parse HEAD)
export CONFIGDIR=/path/to/config
docker load < $(nix-build -A dockerImage --no-out-link --argstr name $NAME --argstr version 
$VERSION )
docker run -p 127.0.0.1:8000:8000/tcp -v "$CONFIGDIR:/var/run/backend/config' "${NAME}:${VERSION}"

@vaibhavsagar
Copy link
Copy Markdown
Collaborator

I would suggest avoiding runAsRoot if at all possible, because using it means constructing the Docker image with QEMU, which is slower than using extraCommands or something along those lines.

Comment thread default.nix Outdated
obelisk doesn't need fully working users; this makes the build faster
and requires less time to build
@3noch
Copy link
Copy Markdown
Collaborator

3noch commented Sep 13, 2019

Can we make this more composable? I.e. by exposing the building blocks?

@ali-abrar
Copy link
Copy Markdown
Member

What needs to happen for us to remove the WIP?

@danbornside danbornside changed the title WIP: minimalish docker image minimalish docker image Oct 5, 2019
@danbornside
Copy link
Copy Markdown
Contributor Author

danbornside commented Oct 5, 2019

What needs to happen for us to remove the WIP?

Wanted to verify that it worked for a few people. It does. I think this is Good Enough™.

@3noch
Copy link
Copy Markdown
Collaborator

3noch commented Oct 6, 2019

Like I said, I'd like to see the guts of this at least pulled out into a function so I can get the "how to create the image" without the image itself. Then I can customize the image if I need to (which is likely).

@JBetz JBetz requested a review from 3noch November 22, 2019 21:03
@JBetz JBetz force-pushed the db-docker-support branch from c7dabb3 to 7109624 Compare November 25, 2019 18:25
@JBetz JBetz added the enhancement New feature or request label Nov 27, 2019
@ingenieroariel
Copy link
Copy Markdown
Collaborator

version is required - would it make sense to make it optional and default to latest ?

@ingenieroariel
Copy link
Copy Markdown
Collaborator

I tested the latest version of the PR locally using NixOS 19.03 and works really well - awesome job!

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.

6 participants