Skip to content

Commit

Permalink
Add Dockerfile to build and run Carbon in docker!
Browse files Browse the repository at this point in the history
  • Loading branch information
vifino committed Dec 8, 2015
1 parent fdb283d commit 8695ab8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions .godir
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/carbonsrv/carbon
34 changes: 34 additions & 0 deletions Dockerfile
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

0 comments on commit 8695ab8

Please sign in to comment.