Update Dockerfile, copy everything, use makefile
I have figured out the `.dockerignore` file so I don't have to do manual context size management like before. The Dockerfile now uses the Makefile to ensure image builds contain the same thing non-image builds would.
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -5,18 +5,9 @@ RUN apt-get install -y --no-install-recommends libasound2-dev libudev-dev
|
||||
RUN rustup target add wasm32-unknown-unknown
|
||||
RUN cargo install --locked wasm-bindgen-cli
|
||||
|
||||
# Copy in only the parts we care about. This is to prevent Docker from re-
|
||||
# running some steps because unimportant files changed (e.g.: the .git/ folder)
|
||||
COPY src/ ./src
|
||||
COPY Cargo.toml ./Cargo.toml
|
||||
# WARN: The lockfile doesn't exist in the repo. You will have to create it
|
||||
# before building the Docker image (i.e.: run `cargo update` first)
|
||||
COPY Cargo.lock ./Cargo.lock
|
||||
COPY www/ ./www
|
||||
COPY Makefile ./Makefile
|
||||
COPY . .
|
||||
|
||||
# Oops. There's no text output in the Docker build command line (it still works, though)
|
||||
RUN make
|
||||
RUN make -j
|
||||
|
||||
FROM busybox:musl
|
||||
RUN mkdir -p /var/www
|
||||
|
||||
Reference in New Issue
Block a user