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

Dockerize the development environment #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JulesAaelio
Copy link
Contributor

dockerize the development environment

Description

Create a docker-compose with an IPFS instance and
a Swagger Editor instance with a live reload
pointing on the developed swagger.yaml.

How Has This Been Tested?

Tested humanly.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Create a docker-compose with an IPFS instance and
a Swagger Editor instance with a live reload
pointing on the developed swagger.yaml.
@@ -0,0 +1,7 @@
FROM alpine:3.4
Copy link
Member

Choose a reason for hiding this comment

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

If it's only for node, use a node alpine official image instead.


RUN apk add --update nodejs

CMD npm install && npm start
Copy link
Member

Choose a reason for hiding this comment

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

I don't see a copy of package.json in the Dockerfile, meaning this Dockerfile doesn't work on its own: the CMD would fail as is.
We usually want a Dockerfile to be self-contained, docker-compose is just a convenience wrapper above.

@@ -0,0 +1,7 @@
#!/bin/sh

ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
Copy link
Member

Choose a reason for hiding this comment

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

Why did you choose this method over the ipfs config file one?
That's shame we have to modify two bash scripts, whereas using a config file seems to be built-in in the start script shipped with the container.

@@ -0,0 +1,98 @@
<!DOCTYPE html>
Copy link
Member

Choose a reason for hiding this comment

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

I think we could ship these files within a docker image and only mount the config as a volume.

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