Skip to content

Commit

Permalink
put openssl back for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmorley committed Jul 1, 2021
1 parent 1a229b7 commit 8866631
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.github/
.ci/
cross/
target/
.dockerignore
.editorconfig
.gitignore
.rustfmt
.tool-versions
Cross.toml
Dockerfile
README.md
12 changes: 8 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description = "Generates temporary AWS credentials with Okta."
edition = "2018"
name = "oktaws"
version = "0.13.1"

[dependencies]
base64 = "0.13"
confy = "*"
Expand All @@ -28,10 +29,6 @@ serde_ini = "0.2"
username = "0.2"
walkdir = "2"

[dependencies.openssl]
features = ["vendored"]
version = "0.10"

[dependencies.reqwest]
features = ["blocking", "cookies", "json"]
version = "0.11"
Expand All @@ -48,5 +45,12 @@ version = "0.3"
features = ["serde"]
version = "2.1"

[target]
[target."cfg(linux)"]
[target."cfg(linux)".dependencies]
[target."cfg(linux)".dependencies.openssl]
features = ["vendored"]
version = "0.10"

[dev-dependencies]
tempfile = "3"
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM clux/muslrust:1.53.0 as cargo-build

RUN apt-get -y update && apt-get -y install libdbus-1-dev

WORKDIR /usr/src/app
COPY Cargo.lock .
COPY Cargo.toml .
#RUN mkdir .cargo src
#RUN touch ./src/main.rs
#RUN --mount=type=cache,target=vendor \
# cargo vendor > .cargo/config

COPY ./src src
RUN --mount=type=cache,target=/root/.cargo/registry \
--mount=type=cache,target=target/release/build \
--mount=type=cache,target=target/release/deps \
cargo build --release
#RUN cargo install --path . --verbose
#RUN --mount=type=cache,target=/root/.cargo/registry \
# --mount=type=cache,target=target/release/build \
# --mount=type=cache,target=target/release/deps \
# cargo run --release -- --version
#RUN target/x86_64-unknown-linux-musl/release/oktaws --version

FROM alpine
# Copy the compiled binary from the builder container
COPY --from=cargo-build /root/.cargo/bin/oktaws /oktaws
# Pass all arguments etc to binary
ENTRYPOINT [ "/oktaws" ]
2 changes: 1 addition & 1 deletion src/config/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ pub fn save_credentials(
let service = format!("oktaws::okta::{}", organization.name);
Keyring::new(&service, username)
.set_password(password)
.map_err(Into::into)
.map_err(|e| format_err!("{}", e))
}
3 changes: 0 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(windows)]
extern crate rpassword;

#[macro_use]
extern crate failure;
#[macro_use]
Expand Down
File renamed without changes.

0 comments on commit 8866631

Please sign in to comment.