-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
52 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
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,32 @@ | ||
# | ||
# Build the docker image | ||
# $ docker build -t user/dcrdex -f client/Dockerfile . | ||
# | ||
# Create docker volume to store client data | ||
# $ docker volume create --name=dcrdex_data | ||
# | ||
# Run the docker image, mapping web access port. | ||
# $ docker run -d --rm -p 127.0.0.1:5758:5758 -v dcrdex_data:/root/.dexc user/dcrdex | ||
# | ||
|
||
# frontend build | ||
FROM node:14 AS nodebuilder | ||
WORKDIR /root/dex | ||
COPY . . | ||
WORKDIR /root/dex/client/webserver/site/ | ||
RUN npm clean-install | ||
RUN npm run build | ||
|
||
# dexc binary build | ||
FROM golang:1.15 AS gobuilder | ||
COPY --from=nodebuilder /root/dex/ /root/dex/ | ||
WORKDIR /root/dex/client/cmd/dexc/ | ||
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build | ||
|
||
# Final image | ||
FROM alpine | ||
WORKDIR /root | ||
COPY --from=gobuilder /root/dex/client/cmd/dexc/dexc ./ | ||
COPY --from=gobuilder /root/dex/client/webserver/site ./site | ||
EXPOSE 5758 | ||
CMD [ "./dexc", "--webaddr=0.0.0.0:5758" ] |