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 Dockerfile to miniPaint #359

Closed
wants to merge 2 commits into from
Closed

add Dockerfile to miniPaint #359

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 1, 2023

Hello, folks!

This is my first pull-request. I added a Dockerfile from: https://github.com/bluenevus/docker-minipaint

what is Docker?
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications.

what is Dockerfile?
Dockerfile is a text document containing all the commands the user requires to call on the command line to assemble an image. With the help of a Dockerfile, users can create an automated build that executes several command-line instructions in succession.

why Dockerfile?
Docker can build images automatically by reading the instructions from a Dockerfile . A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.

did you develop and create this config file?
No. The config file was not created by me, but by bluenevus/docker-minipaint

why are you collaborating, helping or maintaining this repository or source code?

  • I hope you like my initial pull-request.
  • There is another pull-request with some feature.
  • I would like to help the miniPaint community
  • Added this file to increase miniPaint adoption
  • As I said initially, I found a default config file for miniPaint with docker. I just added it because I thought it was interesting and doable.
  • I thought I'd help since I'm a miniPaint user and I really like the software initially
  • There are several configuration files I'm thinking of contributing exclusively to miniPaint like .editorconfig, .replit, .vercel, .netlify, .devContainer, .github, .gitattributes, .render, .goormide, .vscode - each of these configuration files enable greater adoption of miniPaint. These files .replit, .vercel, .netlify, .devContainer are for just to deploy miniPaint in cloud or any software development platform like Vercel, Codespaces, Repl-it, Netlify, Render, Goorm-Ide etc.

Hello, folks!

This is my first pull-request. I added a Dockerfile from: `https://github.com/bluenevus/docker-minipaint`

*what is Docker?*
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications.

*what is Dockerfile?*
Dockerfile is a text document containing all the commands the user requires to call on the command line to assemble an image. With the help of a Dockerfile, users can create an automated build that executes several command-line instructions in succession.

*why Dockerfile?*
Docker can build images automatically by reading the instructions from a Dockerfile . A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.

I hope you like my initial pull-request. There is another pull-request with some feature.
@ghost ghost changed the title add Dockerfile add Dockerfile to miniPaint Mar 1, 2023
adding credit to whoever produced or created the config file
@viliusle
Copy link
Owner

viliusle commented Mar 2, 2023

Can somebody with Docker knowledge review this?

@ghost
Copy link
Author

ghost commented Mar 2, 2023

Hi viliusle.

Can somebody with Docker knowledge review this?

You can check out more information on the Docker Discourse community or in documentations like Dockerfile reference. It has an open issue here: Does it work? and the source code here too bluenevus/docker-minipaint

So it is possible to test this type of file with Codespaces I think

Dev Containers let you run any project in a Docker container. You can do this locally, as we've seen, or you can do it remotely in the cloud using Github's Codespaces.

@Ange-Cesari
Copy link

Hi Ghost and viliusle.

I do have docker knowledge, and it looks not shocking to me. You could make some arrangements, but i'm curious about the centos choice. Why would you use a centos more than an alpine as base image for example ?

The requirements are npm and git. For security purposes you could add the dependencies (and sub dependencies) at the build.

@CreativeCactus
Copy link

I'm not really a fan of this Dockerfile, but I came here because I am happy to see someone contributed it. I will rewrite it now. Thanks for miniPaint, btw!

@ghost
Copy link

ghost commented Apr 1, 2023

Hello eveyone!

I'm thinking of helping, I'm thinking of configuring multiple deployment instances: GitHub Pages, GitLab Pages, Codeberg Pages, Vercel, Codespaces, Repl-it, Netlify, Render, Goorm-Ide in miniPaint.

What do you all think of this idea? Is it something interesting or useful for you all?

@Ange-Cesari
Copy link

Hey,

I wrote a minimalist dockerfile to run miniPaint via docker container.

Simply follow these steps to generate the image yourself:

pre-requesite : docker & git

Step 1 : Go into a folder on your local machine and git clone the miniPaint project:

git clone https://github.com/viliusle/miniPaint.git

Step 2 : Create a dockerfile at the root folder of the project and paste the following code :

#Written by Ange Cesari
# Use official Node.js based on Alpine
FROM node:16-alpine

# Create dir for application
WORKDIR /usr/src/app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm i

# Copy the rest of the application code
COPY . .

# Expose the port the application will run on
EXPOSE 8080

# Run the application
CMD ["npm", "run", "server"]

Step 3 : Build the image :

docker build -t minipaint .

Step 4 : Once i'ts built, run the container and bind the ports :

docker run -d -p 8080:8080 --name minipaint-container minipaint

Step 5 : Once the container is started, you should be able to reach https://localhost:8080

@viliusle
Copy link
Owner

Thank you for contributions.

I added all provided solutions into wiki, so everybody can find it easily. There are multiple versions, so I don't want to move it to main code yet.

https://github.com/viliusle/miniPaint/wiki/Docker

@viliusle viliusle closed this Apr 21, 2023
@ghost
Copy link

ghost commented May 13, 2023

Hi all. Please, add docker files miniPaint in Dockerfiles

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.

3 participants