-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile to build and run Carbon in docker!
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 @@ | ||
github.com/carbonsrv/carbon |
This file contains 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,34 @@ | ||
##################### | ||
# Carbon Dockerfile # | ||
##################### | ||
|
||
FROM golang | ||
|
||
MAINTAINER Adrian "vifino" Pistol | ||
|
||
# Make directory for sources | ||
RUN mkdir -p /go/src/github.com/carbonsrv | ||
|
||
# Make /app a volume, for mounting for example `pwd` to easily run stuff. | ||
VOLUME ["/app"] | ||
WORKDIR /app | ||
|
||
# Get library deps | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
pkgconf \ | ||
libluajit-5.1-dev \ | ||
libphysfs-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy sources over and build | ||
COPY . /go/src/github.com/carbonsrv/carbon | ||
RUN cd /go/src/github.com/carbonsrv/carbon && go get -t -d -v ./... | ||
RUN cd /go/src/github.com/carbonsrv/carbon && go build -v -o /go/bin/carbon | ||
|
||
# Run carbon -h by default! | ||
CMD ["/go/bin/carbon", "-h"] | ||
|
||
# Expose default ports. | ||
|
||
EXPOSE 8080 | ||
EXPOSE 8443 |