Closed kskarthik closed 9 months ago
Maybe try setting STEEL_HOME
with the ENV
line? Like so:
ENV STEEL_HOME="/lib/steel"
Well, It didn't help as well, Here's my Dockerfile
# FROM rust:alpine as build
FROM rust:slim as build
COPY . /steel/
WORKDIR /steel
RUN apt update && \
apt install -y \
build-essential \
libssl-dev \
openssl \
pkg-config
# RUN apk update && \
# apk add openssl-dev \
# openssl \
# pkgconfig \
# alpine-sdk
RUN mkdir -p /lib/steel/
ENV STEEL_HOME="/lib/steel"
RUN cargo build
RUN cargo run -- cogs/install.scm
I managed to build it using that Dockerfile - here is the output:
➜ steel git:(mwp-improper-lists) ✗ docker build .
[+] Building 63.8s (12/12) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 424B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 48B 0.0s
=> [internal] load metadata for docker.io/library/rust:slim 0.3s
=> [internal] load build context 1.2s
=> => transferring context: 204.43MB 1.1s
=> CACHED [1/7] FROM docker.io/library/rust:slim@sha256:8f7df8eb8f5fc25284cb83a0ba6088a09 0.0s
=> [2/7] COPY . /steel/ 1.0s
=> [3/7] WORKDIR /steel 0.0s
=> [4/7] RUN apt update && apt install -y build-essential libssl-dev openssl pk 8.2s
=> [5/7] RUN mkdir -p /lib/steel/ 0.4s
=> [6/7] RUN cargo build 44.9s
=> [7/7] RUN cargo run -- cogs/install.scm 1.5s
=> exporting to image 6.4s
=> => exporting layers 6.4s
=> => writing image sha256:f39dcc7ff32f2326b46900d1d38a798fe3197591d23bb52931d8b44619bf6d 0.0s
I also added a .dockerignore
with the following contents:
target/
yeah, strange! it's working now
BTW STEEL_HOME
is only required during build, right ?
It's used to resolve installed modules, so it's not used during any execution, but it's used when compiling steel code to bytecode. So if you want to use globally installed modules then you'll need it
Finally! done
Using
rust:slim
as base imgAt the following Dockerfile steps:
I get this below err:
Did i miss setting any ENV ?