Skip to content

Instantly share code, notes, and snippets.

@jac18281828
Last active December 16, 2020 15:39
Show Gist options
  • Save jac18281828/eaf5fd59f649178bdafa932a7ed639d1 to your computer and use it in GitHub Desktop.
Save jac18281828/eaf5fd59f649178bdafa932a7ed639d1 to your computer and use it in GitHub Desktop.
FROM debian:10 AS builder
RUN apt update && \
apt -y install build-essential gcc python3 curl openssl
WORKDIR /sha256
RUN curl 'https://gist.githubusercontent.com/dawidpogorzelski/fb28b6ac7d92a7c667af/raw/82b33515ead66303cca251ab950e682a72e81ca0/sha256.c' > sha256.c
RUN gcc -o sha256 -O2 sha256.c
RUN openssl dgst -sha256 sha256 | awk '{print $NF}' -
RUN cat sha256 | ./sha256
@jac18281828
Copy link
Author

jac18281828 commented Dec 16, 2020

Step 3/7 : WORKDIR /sha256
 ---> Running in 30152df71b1c
Removing intermediate container 30152df71b1c
 ---> fbcc5adf0a27
Step 4/7 : RUN curl 'https://gist.githubusercontent.com/dawidpogorzelski/fb28b6ac7d92a7c667af/raw/82b33515ead66303cca251ab950e682a72e81ca0/sha256.c' > sha256.c
 ---> Running in 6708c3af472f
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5040  100  5040    0     0  20571      0 --:--:-- --:--:-- --:--:-- 20571
Removing intermediate container 6708c3af472f
 ---> 179604634772
Step 5/7 : RUN gcc -o sha256 -O2 sha256.c
 ---> Running in a69262bd4bc6
Removing intermediate container a69262bd4bc6
 ---> 42d60c354894
Step 6/7 : RUN openssl dgst -sha256 sha256 | awk '{print $NF}' -
 ---> Running in 45c8832aa976
df0ce3d82a3f10f82ca931d5780d454e0cbb4044bc1db12542a4ebd6e18635c3
Removing intermediate container 45c8832aa976
 ---> 8d1538501ee1
Step 7/7 : RUN cat sha256 | ./sha256
 ---> Running in df55fc7b2945
4ca0fc4bc1ed9ed2e4673bbecd7e5945fa13d4406f7f15faac1dadd4d92647e3
Removing intermediate container df55fc7b2945
 ---> 56a3427fa405
Successfully built 56a3427fa405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment