Skip to content

Commit d3a8050

Browse files
committed
fix(docker): remove dependency on NPM
1 parent 027d4b6 commit d3a8050

File tree

3 files changed

+8
-37
lines changed

3 files changed

+8
-37
lines changed

packages/cosmic-swingset/Dockerfile

+2-31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# The Golang build container.
2-
FROM golang:stretch AS go-build
2+
# TODO This should be split out into the cosmos-connector.
3+
FROM golang:stretch
34

45
WORKDIR /usr/src/app
56
COPY Makefile* *.go go.* ./
@@ -9,33 +10,3 @@ COPY lib/*.go lib/
910
COPY lib/daemon/ lib/daemon/
1011
COPY lib/helper/ lib/helper/
1112
RUN make compile-go install
12-
13-
# The Node build container
14-
FROM node:stretch AS node-build
15-
16-
WORKDIR /usr/src/app
17-
RUN mkdir lib
18-
COPY lib/*.cc lib/
19-
COPY package*.json *.gyp *.tgz ./
20-
RUN echo 'all:' > Makefile
21-
COPY --from=go-build /usr/src/app/lib/*.so /usr/src/app/lib/*.h ./lib/
22-
RUN npm install && npm run build
23-
24-
# The install container
25-
FROM node:stretch AS install
26-
27-
WORKDIR /usr/src/app
28-
COPY lib/ lib/
29-
COPY --from=go-build /usr/src/app/lib/ lib/
30-
RUN mkdir -p build/Release
31-
COPY ssh-tunnel /ssh-tunnel
32-
COPY package*.json *.tgz ./
33-
COPY demo1/ ./demo1/
34-
COPY bin/ ./bin/
35-
RUN npm install --production
36-
COPY --from=node-build /usr/src/app/build/Release/*.node build/Release/
37-
COPY --from=go-build /go/bin/ag-cosmos-helper /usr/local/bin/
38-
39-
# By default, run the daemon with specified arguments.
40-
EXPOSE 26657
41-
ENTRYPOINT [ "./lib/ag-chain-cosmos" ]

packages/deployment/Dockerfile.sdk

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# The Node install container
2-
FROM agoric/cosmic-swingset:latest
1+
# The install container
2+
FROM node:stretch AS install
33

44
WORKDIR /usr/src/agoric-sdk
55
COPY . .
6-
RUN (cd packages/cosmic-swingset && tar -cf - .) | (cd ../app && tar -xBpf -) && \
7-
rm -rf packages/cosmic-swingset && mv ../app packages/cosmic-swingset && \
8-
ln -s agoric-sdk/packages/cosmic-swingset ../app
6+
COPY --from=agoric/cosmic-swingset-go:latest /usr/src/app/lib/ packages/cosmic-swingset/lib/
7+
COPY --from=agoric/cosmic-swingset-go:latest /go/bin/ag-cosmos-helper /usr/local/bin/
8+
RUN ln -s agoric-sdk/packages/cosmic-swingset ../app
99
RUN echo 'all:' > packages/cosmic-swingset/Makefile
1010

1111
RUN yarn install

packages/deployment/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ docker-build-base:
1717
hash=`git rev-parse --short HEAD`; \
1818
dirty=`git diff --quiet || echo -dirty`; \
1919
echo "$$hash$$dirty" > $(SS)lib/git-revision.txt
20-
docker build -t $(REPOSITORY):latest $(SS)
20+
docker build -t $(REPOSITORY)-go:latest $(SS)
2121

2222
docker-build-pserver:
2323
docker build -t $(REPOSITORY)-pserver:latest $(SS)provisioning-server

0 commit comments

Comments
 (0)