-
Notifications
You must be signed in to change notification settings - Fork 34
Docker support #37
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
Open
daitangio
wants to merge
4
commits into
lisdude:master
Choose a base branch
from
daitangio:docker-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Docker support #37
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| FROM ubuntu:20.10 | ||
| RUN apt update | ||
| RUN apt install -y build-essential bison gperf cmake libsqlite3-dev libaspell-dev libpcre3-dev nettle-dev g++ libcurl4-openssl-dev libargon2-dev | ||
|
|
||
| WORKDIR /toaststunt | ||
| COPY src /toaststunt/src/ | ||
|
|
||
| COPY CMakeLists.txt /toaststunt/ | ||
| COPY CMakeModules /toaststunt/CMakeModules | ||
|
|
||
|
|
||
| WORKDIR /toaststunt/ | ||
| RUN pwd ; mkdir build && cd build && cmake ../ | ||
| RUN cd /toaststunt/build && make -j2 | ||
|
|
||
| # A special restart which output on stdout is needed for docker | ||
| COPY docker_restart.sh /toaststunt/build/ | ||
| EXPOSE 7777 | ||
| ENTRYPOINT cd /toaststunt/build/ ; ./docker_restart.sh /cores/$CORE_TO_LOAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| version: '2' | ||
|
|
||
| services: | ||
| dev_server: | ||
| image: toaststunt:2.7.0_10 | ||
| build: | ||
| context: . | ||
| # Server port can be re-mapped outside container below | ||
| # Just change the left side of the following line: | ||
| ports: | ||
| - 7777:7777 | ||
| environment: | ||
| # OTHER EXAMPLES: CORE_TO_LOAD=test-cores/toastcore | ||
| - CORE_TO_LOAD=Minimal | ||
| volumes: | ||
| - ./:/cores | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #!/bin/sh | ||
|
|
||
| # Copyright (c) 1992, 1994, 1995, 1996 Xerox Corporation. All rights reserved. | ||
| # Portions of this code were written by Stephen White, aka ghond. | ||
| # Use and copying of this software and preparation of derivative works based | ||
| # upon this software are permitted. Any distribution of this software or | ||
| # derivative works must comply with all applicable United States export | ||
| # control laws. This software is made available AS IS, and Xerox Corporation | ||
| # makes no warranty about the software, its performance or its conformity to | ||
| # any specification. Any person obtaining a copy of this software is requested | ||
| # to send their name and post office or electronic mail address to: | ||
| # Pavel Curtis | ||
| # Xerox PARC | ||
| # 3333 Coyote Hill Rd. | ||
| # Palo Alto, CA 94304 | ||
| # Pavel@Xerox.Com | ||
|
|
||
| if [ $# -lt 1 -o $# -gt 2 ]; then | ||
| echo 'Usage: restart dbase-prefix [port]' | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ ! -r $1.db ]; then | ||
| echo "Unknown database: $1.db" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -r $1.db.new ]; then | ||
| mv $1.db $1.db.old | ||
| mv $1.db.new $1.db | ||
| rm -f $1.db.old.Z | ||
| compress $1.db.old & | ||
| fi | ||
|
|
||
| if [ -f $1.log ]; then | ||
| cat $1.log >> $1.log.old | ||
| rm $1.log | ||
| fi | ||
|
|
||
| echo `date`: RESTARTED >> $1.log | ||
| ./moo $1.db $1.db.new $2 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Server port should be configurable via environment variables.
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.
Server port can be re-mapped outside container using the ports syntax.
See comments in the new commit ea4ca08