Comments (4)
Note also that the way the docker image is run (without compilation, using go run
) seems to makes go engine compile the binary into a temp folder, and then the json configuration file is this temp folder, eg:
# cat /tmp/go-build1056151863/b001/exe/gitconvex_env_config.json
{
"databaseFile": "/tmp/go-build1056151863/b001/exe//gitconvex-database/repo_datastore.json",
"port": "9001"
}
This makes the current docker image hard to use to me, because I don't see how to provide configuration to the container.
from gitconvex.
I tried using this Dockerfile
:
FROM golang:1.16.0-alpine AS builder
WORKDIR /go/src/github.com/neel1996/gitconvex
COPY . .
# Install required packages
RUN apk update && \
apk add --update libgit2-dev libssh2-dev gcc make nodejs npm musl-dev
# Building server
RUN go get -v && \
make build-server && \
mv ./dist/gitconvex-server ./dist/gitconvex
# Building React UI bundle
RUN cd ui/ && \
npm install && \
export NODE_ENV=production && \
npm i -g npm@6 && \
npm install tailwindcss postcss autoprefixer && \
npx tailwindcss build -o src/index.css -c src/tailwind.config.js && \
npm run build && \
mv build ../dist/gitconvex-ui && \
cd ..
FROM alpine:latest
WORKDIR /app
RUN apk update && \
apk add --update libgit2 libssh2
COPY --from=builder /go/src/github.com/neel1996/gitconvex/dist .
EXPOSE 9001
CMD ["./gitconvex"]
The output image seems to work (at least to few I tested), has stable folders (so we can override configuration easily) and is 35MB.
from gitconvex.
Hi @vincent-tr
You are right. The docker image size is quite large and this has been fixed in the gitconvex-server
. I am currently in the process of refactoring the existing api and adding a robust test suite around it.
Once the changes for the server is complete, it will be merged with the gitconvex
repo which will optimize the image size (it uses alpine image and alpine packages).
from gitconvex.
Hi @vincent-tr
Following up on the PR idea for building the binaries as part of dockerization is a good idea and would be the right approach to do it.
You are welcome to propose a PR to the gitconvex-server
repository
from gitconvex.
Related Issues (20)
- Cloned repo directory issue HOT 1
- Remote repo count error
- Incorrect message in file view
- Push operation failed HOT 1
- Staging removed files fails
- Delay in branch checkout view
- UI error in file view section
- Push to remote option disabled for new local branch
- Delay on loading branches in repository.
- UI error for empty files in file explorer
- Error in newly initialized git repo. HOT 2
- Commit log error in new repo
- Installation via brew produce: "Errno::EISDIR: Is a directory - read" HOT 1
- Build Project from DockerFile doesn't work
- furry
- ok now
- view
- check issue
- try this
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitconvex.