Skip to content

Commit

Permalink
Merge pull request #52 from microsoft/devcont
Browse files Browse the repository at this point in the history
simplify devcontainer
  • Loading branch information
qmuntal committed Jun 2, 2023
2 parents 35d7028 + 1973167 commit e3ffd82
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
5 changes: 0 additions & 5 deletions .devcontainer/Dockerfile

This file was deleted.

16 changes: 4 additions & 12 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@

{
"name": "Go",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "1.17-bullseye",
}
},
"containerEnv": {
"GO_OPENSSL_VERSION_OVERRIDE": "1.1.0",
"GO_OPENSSL_VERSION_OVERRIDE": "1.1.1"
},
"onCreateCommand": "sh ${containerWorkspaceFolder}/scripts/openssl.sh ${GO_OPENSSL_VERSION_OVERRIDE}",
"customizations": {
"vscode": {
"extensions": ["golang.go"]
}
"features": {
"ghcr.io/devcontainers/features/go:1": {}
},
"onCreateCommand": "sudo sh ${containerWorkspaceFolder}/scripts/openssl.sh ${GO_OPENSSL_VERSION_OVERRIDE}"
}
11 changes: 9 additions & 2 deletions scripts/openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,28 @@ case "$version" in
sha256="82fa58e3f273c53128c6fe7e3635ec8cda1319a10ce1ad50a987c3df0deeef05"
config="shared"
make="build_libs"
install=""
;;
"1.1.0")
tag="OpenSSL_1_1_0l"
sha256="e2acf0cf58d9bff2b42f2dc0aee79340c8ffe2c5e45d3ca4533dd5d4f5775b1d"
config="shared"
make="build_libs"
install=""
;;
"1.1.1")
tag="OpenSSL_1_1_1m"
sha256="36ae24ad7cf0a824d0b76ac08861262e47ec541e5d0f20e6d94bab90b2dab360"
config="shared"
make="build_libs"
install=""
;;
"3.0.1")
tag="openssl-3.0.1";
sha256="2a9dcf05531e8be96c296259e817edc41619017a4bf3e229b4618a70103251d5"
config="shared enable-fips"
make="install_fips"
config="enable-fips"
make="build_libs"
install="install_fips"
;;
*)
echo >&2 "error: unsupported OpenSSL version '$version'"
Expand All @@ -49,5 +53,8 @@ mv "openssl-$tag" "openssl-$version"
cd "openssl-$version"
./config $config
make -j$(nproc) $make
if [ -n "$install" ]; then
make $install
fi

cp -H ./libcrypto.so "/usr/lib/libcrypto.so.${version}"

0 comments on commit e3ffd82

Please sign in to comment.