Skip to content

Instantly share code, notes, and snippets.

docker run -it --rm image-name1
docker run -it --rm image-name2
docker run -it --rm image-name3
FROM nixpkgs/nix as build
// Do your building stuff here
// Lets assume your file is located in /build directory
FROM alpine
COPY --from=build /build /app
ENTRYPOINT ["/app/my-binary"]
server {
listen 80;
server_name example.test admin.example.test partner.example.test;
root /var/www/html/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
@karlisabele
karlisabele / Dockerfile
Last active January 25, 2023 14:10
Simple openjdk and mysql docker set-up
FROM openjdk:8u201-jdk-alpine3.9
RUN apk update && apk add mysql-client && rm -f /var/cache/apk/*
ENTRYPOINT ["sh"]
CMD ["-c" , "tail -f /dev/null"]
@karlisabele
karlisabele / Dockerfile
Created June 13, 2019 10:41
WP plugins and themes pre-installed on docker image
FROM wordpress:php7.1-apache
### This is where you copy all the plugins and themes to the corresponding folders
COPY my-theme /themes/my-theme
COPY my-plugin /plugins/my-plugin
COPY entrypoint.sh /usr/bin/entrypoint
RUN chmod +x /usr/bin/entrypoint