Created
January 30, 2023 17:44
-
-
Save trikko/3f4b48cc75bcdb8378074e3dbb2dc95a to your computer and use it in GitHub Desktop.
Serverino + Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest | |
RUN apk update && apk upgrade | |
RUN apk add dmd dub cmake gcc make musl-dev | |
RUN ln -fs /usr/share/zoneinfo/Europe/Rome /etc/localtime | |
RUN apk add tzdata | |
RUN adduser -D -S www-data | |
WORKDIR /source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run -ti --rm -v $(pwd):/source -v $(pwd)/.docker-dub:/root/.dub -p 8080:8080 your_docker dub $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create your app:
dub init -t serverino my_serverino && cd my_serverino
Build your docker with:
docker build -t your_docker .
Run serverino inside your docker:
./dub.sh