Skip to content

Commit 0e3e40d

Browse files
authored
fix: docker assets/ 404 (#15)
* fix: docker assets/ 404 * chore(devcontainer): add docker-in-docker feature * chore: version 0.3.8
1 parent 716e859 commit 0e3e40d

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
66
"image": "mcr.microsoft.com/devcontainers/rust:latest",
77
"features": {
8-
"ghcr.io/devcontainers/features/node:latest": {}
8+
"ghcr.io/devcontainers/features/node:latest": {},
9+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
910
},
1011
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
1112
// "mounts": [

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stoic-quotes"
3-
version = "0.3.7"
3+
version = "0.3.8"
44
edition = "2021"
55
authors = ["Jose Storopoli <[email protected]>"]
66
description = "Stoic quotes API backend"

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ WORKDIR /usr/src/app
1212

1313
# Add labels for OCI annotations
1414
LABEL org.opencontainers.image.source="https://github.com/storopoli/stoic-quotes" \
15-
org.opencontainers.image.description="Stoic Quotes" \
16-
org.opencontainers.image.licenses="MIT"
15+
org.opencontainers.image.description="Stoic Quotes" \
16+
org.opencontainers.image.licenses="MIT"
1717

1818
# Copy project's Cargo.toml file
1919
COPY ./Cargo.toml ./
@@ -37,8 +37,12 @@ RUN cargo build --release --target x86_64-unknown-linux-musl
3737
# Start a new stage from a slim version of Debian to reduce the size of the final image
3838
FROM debian:buster-slim
3939

40+
WORKDIR /usr/src/app
41+
4042
# Copy the binary from the builder stage to the new stage
4143
COPY --from=builder /usr/src/app/target/x86_64-unknown-linux-musl/release/stoic-quotes /usr/local/bin/stoic-quotes
44+
# Copy the assets/ from the builder stage to the new stage
45+
COPY --from=builder /usr/src/app/assets /usr/src/app/assets
4246

4347
# Expose port 3000
4448
EXPOSE 3000

0 commit comments

Comments
 (0)