-
-
Notifications
You must be signed in to change notification settings - Fork 502
Make docker run locally #3680
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
Make docker run locally #3680
Changes from 7 commits
23e1dae
2deadf8
d13e91c
e836313
2b628ab
2277d51
6fb0f8f
2fe125d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| *.bat | ||
| Bin | ||
| Build | ||
| .git | ||
| .github |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| @echo off | ||
|
|
||
| set NAME=mtasa | ||
|
|
||
| docker build . -t "%NAME%" | ||
| for /f "delims=" %%i in ('docker images -q %NAME%') do set ID=%%i | ||
|
|
||
| echo. | ||
| echo ID: %ID% |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/bin/bash | ||
|
|
||
| NAME="mtasa" | ||
|
|
||
| docker build . -t $NAME | ||
| ID = $(docker images -q $NAME) | ||
TracerDS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| echo "" | ||
| echo "ID: $ID" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,11 +21,6 @@ if [[ $AS_BUILDAGENT = "1" ]]; then | |
| fi | ||
|
|
||
| # Manually invoke build process | ||
| # So, first make a shallow clone of the repository if it not exists | ||
| umask 000 | ||
| if [ ! -f ./premake5.lua ]; then | ||
| git clone --depth=1 https://github.com/multitheftauto/mtasa-blue.git . | ||
| fi | ||
|
Comment on lines
-24
to
-28
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? Nothing is wrong here. This line allows you to build MTA without cloning the MTA repository.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this line actually clones the entire repo all the time.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't. Check your command line and current folder
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does. Docker pulls mta repo from github if that line is saved. Without it, it runs only local changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. I tested it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Me too. It didnt accept local copy unless I remove that line.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cd <mta sa repo here>
docker build -t mtasabuilder:latest .
docker run --rm -v ./:/build mtasabuilder:latestDoes it work?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "volume name is too short, names should be at least two alphanumeric characters."
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
|
|
||
| # Start manual building | ||
| export GLIBC_COMPAT=true | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use
-vparameter indocker runto mount these folders into a containerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would it work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should mount mta repository (or an empty folder) to
/buildfolder in a container.docker-entrypoint.shruns inside this folder.