Skip to content

Commit

Permalink
Switch docker base image to alpine, and remove container after compil…
Browse files Browse the repository at this point in the history
…ation (#5)

* Switch docker base image to alpine, and remove container after compilation.
* Remove unnecessary ADD command in Dockerfile
  • Loading branch information
eriknstevenson authored Oct 6, 2017
1 parent f549a15 commit 952214c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM ubuntu
FROM alpine

MAINTAINER Kelvin Abrokwa ([email protected])

# install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
RUN apk add --update \
alpine-sdk \
gcc-avr \
binutils-avr \
avr-libc

WORKDIR firmware/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $(HEX): $(BINARY)

docker-build:
docker build -t firmware-builder .
docker run -it -v `pwd`/:/firmware firmware-builder /bin/bash -c "cd firmware; make"
docker run --rm -v `pwd`/:/firmware firmware-builder make

flash-arduino-uno: $(HEX)
avrdude -c $(PROGRAMMER) -p $(MMCU) -P $(USB) -U flash:w:$< -v
Expand Down

0 comments on commit 952214c

Please sign in to comment.