Skip to content

Commit 76025b1

Browse files
ggeraweichweich
andauthored
Optimizes docker layer (#337)
* Adds copy all files in a sigle layer command * Removes unused docker layer * Changes debian image to ubuntu Co-authored-by: Albrecht <albrecht@kilt.io>
1 parent c23fe67 commit 76025b1

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
.github
33
.gitignore
44
.gitlab-ci.yml
5+
.rustfmt.toml
6+
**/.maintain*
57
**/target*
68
**/*.rs.bk
79
*.iml

Dockerfile

+1-20
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ WORKDIR /build
88

99
ARG FEATURES=default
1010

11-
COPY ./nodes /build/nodes
12-
COPY ./pallets /build/pallets
13-
COPY ./runtimes /build/runtimes
14-
COPY ./support /build/support
15-
COPY ./Cargo.lock /build/Cargo.lock
16-
COPY ./Cargo.toml /build/Cargo.toml
11+
COPY . .
1712

1813
RUN cargo build --locked --release --features $FEATURES
1914

@@ -24,20 +19,6 @@ LABEL description="This is the 2nd stage: a very small image where we copy the k
2419

2520
ARG NODE_TYPE=kilt-parachain
2621

27-
# install tools and dependencies
28-
RUN apt-get update && \
29-
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
30-
DEBIAN_FRONTEND=noninteractive apt-get install -y \
31-
libssl1.1 \
32-
ca-certificates \
33-
curl && \
34-
# apt cleanup
35-
apt-get autoremove -y && \
36-
apt-get clean && \
37-
find /var/lib/apt/lists/ -type f -not -name lock -delete
38-
39-
COPY ./LICENSE /build/LICENSE
40-
COPY ./README.md /build/README.md
4122
COPY --from=builder /build/target/release/$NODE_TYPE /usr/local/bin/node-executable
4223

4324
RUN useradd -m -u 1000 -U -s /bin/sh -d /node node && \

0 commit comments

Comments
 (0)