Coder Social home page Coder Social logo

Comments (6)

kskarthik avatar kskarthik commented on May 28, 2024 1

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

from steel.

mattwparas avatar mattwparas commented on May 28, 2024 1

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

from steel.

mattwparas avatar mattwparas commented on May 28, 2024

Maybe try setting STEEL_HOME with the ENV line? Like so:

ENV STEEL_HOME="/lib/steel"

from steel.

mattwparas avatar mattwparas commented on May 28, 2024

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/

from steel.

kskarthik avatar kskarthik commented on May 28, 2024

yeah, strange! it's working now

BTW STEEL_HOME is only required during build, right ?

from steel.

kskarthik avatar kskarthik commented on May 28, 2024

Finally! done

image

from steel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.