-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathDockerfile
31 lines (23 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM golang
LABEL Aditya Hajare https://www.linkedin.com/in/aditya-hajare
# Declare required environment variables
ENV GOPHERFACE_APP_ROOT=/go/src/github.com/aditya43/golang/69-social-network-built-in-go-and-gopherjs
ENV GOPHERFACE_HASH_KEY="CRKVBJs0kfyeQ9Y1"
ENV GOPHERFACE_BLOCK_KEY="9LtmRLzVH27CwxrO"
ENV GOPATH=/go
# Get the required Go packages
RUN go get -u github.com/gopherjs/gopherjs
RUN go get -u honnef.co/go/js/dom
RUN go get -u -d -tags=js github.com/gopherjs/jsbuiltin
RUN go get -u honnef.co/go/js/xhr
RUN go get -u github.com/gopherjs/websocket
RUN go get -u go.isomorphicgo.org/go/isokit
RUN go get -u github.com/EngineerKamesh/gofullstack
# Transpile and install the client-side application code
RUN cd $GOPHERFACE_APP_ROOT/client; go get ./..; /go/bin/gopherjs build -m --verbose -o $GOPHERFACE_APP_ROOT/static/js/client.min.js
# Build and install the server-side application code
RUN go install github.com/aditya43/golang/69-social-network-built-in-go-and-gopherjs
# Specify the entrypoint
ENTRYPOINT /go/bin/gopherface
# Expose port 8080 of the container
EXPOSE 8080