Create Dockerfile #13

Open
segator wants to merge 1 commit from segator/feature/createDockerFile into master
segator commented 2019-02-10 07:17:15 -05:00 (Migrated from github.com)

I created the lcvpn docker
to build & run

docker build  -t segator/lcvpn .
docker run -d --name lcvpn  -v /my/lcvpn.conf:/config/lcvpn.conf  -p 25001:25001/udp segator/lcvp
I created the lcvpn docker to build & run ```bash docker build -t segator/lcvpn . docker run -d --name lcvpn -v /my/lcvpn.conf:/config/lcvpn.conf -p 25001:25001/udp segator/lcvp ```
kanocz commented 2019-02-10 07:34:23 -05:00 (Migrated from github.com)

@segator I have 2 questions :)

  1. what's a reason to run VPN in docker? you're almost separated from global network and this lcvpn instance will be mostly limited to only docket container... I can image that it will has access to other docker containers and so on, but this will require little bit complicated configuration
  2. why you're using 'alpine' as basic image + doing some magic with symbolic links (libc.musl-x86_64.so.1 to ld-linux-x86-64.so.2)? golang creates static binary which doesn't require any external library or file, so empty container with only lcvpn binary (and external volume with config which can direct to host filesystem) will be more then enough
@segator I have 2 questions :) 1) what's a reason to run VPN in docker? you're almost separated from global network and this lcvpn instance will be mostly limited to only docket container... I can image that it will has access to other docker containers and so on, but this will require little bit complicated configuration 2) why you're using 'alpine' as basic image + doing some magic with symbolic links (libc.musl-x86_64.so.1 to ld-linux-x86-64.so.2)? golang creates static binary which doesn't require any external library or file, so empty container with only lcvpn binary (and external volume with config which can direct to host filesystem) will be more then enough
segator commented 2019-02-10 10:51:37 -05:00 (Migrated from github.com)

This is q common case when using alpine in go, i saw in a lot of docker go apps, in fact lcvpn doesnt work if dont set, why docker? Because is very easy to setup, if -net host then tun is created on the host so any app can use it

This is q common case when using alpine in go, i saw in a lot of docker go apps, in fact lcvpn doesnt work if dont set, why docker? Because is very easy to setup, if -net host then tun is created on the host so any app can use it
kanocz commented 2019-02-11 14:21:16 -05:00 (Migrated from github.com)

@segator

  1. you don't need alpine - just use FROM scratch :) it will work and resulting container will be many times smaller :) and I believe that it will work without any problems
  2. ok then :) but please add instruction of usage to README or add something like docker-readme.txt where -net host is also there, so users who don't use docker on daily basis will not reports bugs as nothing works :)
@segator 1) you don't need alpine - just use `FROM scratch` :) it will work and resulting container will be many times smaller :) and I believe that it will work without any problems 2) ok then :) but please add instruction of usage to README or add something like docker-readme.txt where `-net host` is also there, so users who don't use docker on daily basis will not reports bugs as nothing works :)
l0k18 commented 2019-02-11 15:17:23 -05:00 (Migrated from github.com)

There is also a method for building an ultra-slim container for running Go applications, it involves starting first with a full build and then it rips out everything except what Go needs.

https://blog.codeship.com/building-minimal-docker-containers-for-go-applications/

There is also a method for building an ultra-slim container for running Go applications, it involves starting first with a full build and then it rips out everything except what Go needs. https://blog.codeship.com/building-minimal-docker-containers-for-go-applications/
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin segator/feature/createDockerFile:segator/feature/createDockerFile
git switch segator/feature/createDockerFile

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff segator/feature/createDockerFile
git switch segator/feature/createDockerFile
git rebase master
git switch master
git merge --ff-only segator/feature/createDockerFile
git switch segator/feature/createDockerFile
git rebase master
git switch master
git merge --no-ff segator/feature/createDockerFile
git switch master
git merge --squash segator/feature/createDockerFile
git switch master
git merge --ff-only segator/feature/createDockerFile
git switch master
git merge segator/feature/createDockerFile
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kanocz/lcvpn!13
No description provided.